Changeset 4170 for branches/f4grobner/buchberger.lisp
- Timestamp:
- 2016-06-03T02:03:26-07:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/buchberger.lisp
r4132 r4170 75 75 nil) 76 76 (t 77 (setf sp (poly-primitive-part ringsp)77 (setf sp (poly-primitive-part sp) 78 78 f (nconc f (list sp))) 79 79 ;; Add new critical pairs … … 86 86 t))))) 87 87 88 (defun parallel-buchberger ( ring-and-orderf88 (defun parallel-buchberger (f 89 89 &optional 90 90 (start 0) 91 (top-reduction-only $poly_top_reduction_only) 92 &aux 93 (ring (ro-ring ring-and-order))) 91 (top-reduction-only $poly_top_reduction_only)) 94 92 "An implementation of the Buchberger algorithm. Return Grobner basis 95 93 of the ideal generated by the polynomial list F. Polynomials 0 to … … 97 95 critical pairs will not be examined. If TOP-REDUCTION-ONLY set, top 98 96 reduction will be preformed." 99 (declare (type ring-and-order ring-and-order) 100 (ignore top-reduction-only) 97 (declare (ignore top-reduction-only) 101 98 (type fixnum start)) 102 99 (when (endp f) (return-from parallel-buchberger f)) ;cut startup costs … … 104 101 (when (plusp start) (debug-cgb "~&INCREMENTAL:~d done" start)) 105 102 #+grobner-check (when (plusp start) 106 (grobner-test ring-and-order(subseq f 0 start) (subseq f 0 start)))103 (grobner-test (subseq f 0 start) (subseq f 0 start))) 107 104 ;;Initialize critical pairs 108 105 (let ((b (pair-queue-initialize (make-pair-queue) f start)) … … 116 113 (do () 117 114 ((pair-queue-empty-p b) 118 #+grobner-check(grobner-test ring-and-orderf f)115 #+grobner-check(grobner-test f f) 119 116 (debug-cgb "~&GROBNER END") 120 117 f) 121 118 (let ((pair (pair-queue-remove b))) 122 119 (when (null (pair-division-data pair)) 123 (setf (pair-division-data pair) (list (s poly ring-and-order120 (setf (pair-division-data pair) (list (s-polynomial 124 121 (pair-first pair) 125 122 (pair-second pair))
Note:
See TracChangeset
for help on using the changeset viewer.