- Timestamp:
- 2016-06-01T22:44:22-07:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/pair-queue.lisp
r4139 r4142 108 108 (with-slots (pair-key-fn pair-order-fn) 109 109 strategy 110 ( reinitialize-instanceself110 (call-next-method self 111 111 :element-type 'critical-pair 112 112 :element-key #'(lambda (pair) (funcall pair-key-fn … … 115 115 :test pair-order-fn))) 116 116 117 (defgeneric enqueue-critical-pairs (self &optional poly-list start) 118 (:method ((self critical-pair-queue) &optional (poly-list nil) (start 0)) 119 "The argument POLY-LIST should the initial list of 117 (defun make-critical-pairs (poly-list &optional (start 0) 118 &aux 119 (s (1- (length poly-list)))) 120 "The argument POLY-LIST should the initial list of 120 121 polynomials. and START is the first position beyond the elements 121 122 which form a partial Grobner basis, i.e. satisfy the Buchberger 122 123 criterion." 123 (let* ((s (1- (length poly-list))) 124 (b (nconc (makelist (make-instance 'critical-pair :first (elt poly-list i) :second (elt poly-list j)) 125 (i 0 (1- start)) (j start s)) 126 (makelist (make-instance 'critical-pair :first (elt poly-list i) :second (elt poly-list j)) 127 (i start (1- s)) (j (1+ i) s))))) 124 (nconc (makelist (make-instance 'critical-pair :first (elt poly-list i) :second (elt poly-list j)) 125 (i 0 (1- start)) (j start s)) 126 (makelist (make-instance 'critical-pair :first (elt poly-list i) :second (elt poly-list j)) 127 (i start (1- s)) (j (1+ i) s)))) 128 #| 129 128 130 (dolist (pair b self) 129 131 (enqueue self pair))))) 132 |# 130 133 131
Note:
See TracChangeset
for help on using the changeset viewer.