Changeset 4143
- Timestamp:
- 2016-06-02T19:21:09-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/pair-queue.lisp
r4142 r4143 30 30 "+MIN-TOTAL-DEGREE-STRATEGY+" 31 31 "+MIN-COMBINED-LENGTH-STRATEGY+" 32 "MAKE-CRITICAL-PAIR -QUEUE"32 "MAKE-CRITICAL-PAIRS" 33 33 ) 34 34 (:documentation "Critical pair queue implementation. The pair queue is a list of critical … … 103 103 (:documentation "Implements critical pair priority queue.")) 104 104 105 (defmethod initialize-instance :after ((self critical-pair-queue) &key strategy poly-list start) 106 "Allocates a priority queue SELF for critical pairs from strategy SELF." 107 (declare (ignore poly-list start)) 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." 108 107 (with-slots (pair-key-fn pair-order-fn) 109 108 strategy 110 109 (call-next-method self 111 112 113 114 115 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))) 116 115 117 116 (defun make-critical-pairs (poly-list &optional (start 0) … … 126 125 (makelist (make-instance 'critical-pair :first (elt poly-list i) :second (elt poly-list j)) 127 126 (i start (1- s)) (j (1+ i) s)))) 128 #|129 127 130 (dolist (pair b self) 131 (enqueue self pair))))) 132 |# 128 (defgeneric enqueue-critical-pairs (self pair-lst) 129 (:method ((self critical-pair-queue) pair-lst) 130 (dolist (pair pair-lst self) 131 (enqueue self pair)))) 133 132
Note:
See TracChangeset
for help on using the changeset viewer.