Changeset 4144
- Timestamp:
- 2016-06-02T19:29:52-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/pair-queue.lisp
r4143 r4144 99 99 polynomials is selected.") 100 100 101 (defclass critical-pair-queue (priority-queue) 102 () 103 (:documentation "Implements critical pair priority queue.")) 104 105 (defmethod initialize-instance :after ((self critical-pair-queue) &key (strategy +normal-strategy+)) 106 "Initializes a priority queue SELF for critical pairs from strategy SELF." 107 (with-slots (pair-key-fn pair-order-fn) 108 strategy 109 (call-next-method self 110 :element-type 'critical-pair 111 :element-key #'(lambda (pair) (funcall pair-key-fn 112 (critical-pair-first pair) 113 (critical-pair-second pair))) 114 :test pair-order-fn))) 101 (defgeneric make-critical-pair-queue (object) 102 (:documentation "A factory of critical-pair-queue objects.") 103 (:method ((self strategy)) 104 "Creates a priority queue with selection strategy STRATEGY." 105 (with-slots (pair-key-fn pair-order-fn) 106 strategy 107 (make-instance 'pair-queue 108 :element-type 'critical-pair 109 :element-key #'(lambda (pair) (funcall pair-key-fn 110 (critical-pair-first pair) 111 (critical-pair-second pair))) 112 :test pair-order-fn)))) 115 113 116 114 (defun make-critical-pairs (poly-list &optional (start 0)
Note:
See TracChangeset
for help on using the changeset viewer.