Changeset 4162
- Timestamp:
- 2016-06-02T23:56:03-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/pair-queue.lisp
r4161 r4162 112 112 self) 113 113 114 (defgeneric make-critical-pair-queue (object)115 (:documentation "Creates a CRITICAL-PAIR-QUEUE from an object OBJECT.")116 (:method ((object selection-strategy))117 (with-slots (pair-key-fn pair-order-fn)118 object119 (make-instance 'critical-pair-queue120 :element-key #'(lambda (pair) (funcall pair-key-fn121 (critical-pair-first pair)122 (critical-pair-second pair)))123 :test pair-order-fn))))124 125 114 (defun make-critical-pairs (poly-list 126 115 &optional (start 0) … … 141 130 (enqueue self pair)))) 142 131 132 133 (defgeneric make-critical-pair-queue (object &optional poly-lst start) 134 (:documentation "Creates a CRITICAL-PAIR-QUEUE from an object OBJECT.") 135 (:method ((object selection-strategy) &optional (poly-lst nil) (start 0)) 136 (with-slots (pair-key-fn pair-order-fn) 137 object 138 (make-instance 'critical-pair-queue 139 :element-key #'(lambda (pair) 140 (funcall pair-key-fn 141 (critical-pair-first pair) 142 (critical-pair-second pair))) 143 :test pair-order-fn)))) 144
Note:
See TracChangeset
for help on using the changeset viewer.