Changeset 3945 for branches/f4grobner
- Timestamp:
- 2016-05-30T00:37:06-07:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/pair-queue.lisp
r3944 r3945 88 88 ((pq :initform nil :initarg :pq :accessor pq :type priority-queue))) 89 89 90 (defmethod initialize-instance :after ((self critical-pair-queue) &key )90 (defmethod initialize-instance :after ((self critical-pair-queue) &key (f nil) (start 0)) 91 91 (with-accessors ((pair-key-fn pair-key-fn) 92 92 (pair-order-fn pair-order-fn) … … 96 96 :element-type 'critical-pair 97 97 :element-key #'(lambda (pair) (funcall pair-key-fn (critical-pair-first pair) (critical-pair-second pair))) 98 :test pair-order-fn)))) 98 :test pair-order-fn)) 99 (let* ((s (1- (length f))) 100 (b (nconc (makelist (make-instance 'critical-pair :first (elt f i) :second (elt f j)) 101 (i 0 (1- start)) (j start s)) 102 (makelist (make-instance 'critical-pair :first (elt f i) :second (elt f j)) 103 (i start (1- s)) (j (1+ i) s))))) 104 (dolist (pair b pq) 105 (priority-queue-insert pq pair))) 106 )) 99 107 100 108 (defmethod print-object ((self critical-pair-queue) stream)
Note:
See TracChangeset
for help on using the changeset viewer.