- Timestamp:
- 2015-06-20T00:42:55-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/polynomial.lisp
r2591 r2593 86 86 self) 87 87 88 (defun fast-add-to (p q )88 (defun fast-add-to (p q order-fn) 89 89 "Fast destructive addition of termlists 90 90 Note that this assumes the presence of a … … 98 98 (multiple-value-bind 99 99 (greater-p equal-p) 100 ( lex>(lt q) (lt p))100 (funcall order-fn (lt q) (lt p)) 101 101 (cond 102 102 (greater-p … … 115 115 The result is stored in SELF. This implementation does 116 116 no consing, entirely reusing the sells of SELF and OTHER." 117 (with-slots ((termlist1 termlist) )117 (with-slots ((termlist1 termlist) (order1 order)) 118 118 self 119 (with-slots ((termlist2 termlist) )119 (with-slots ((termlist2 termlist) (order2 order)) 120 120 other 121 (unless (eq order1 order2) 122 (setf termlist2 (sort order1 termlist2))) 121 123 ;; Create dummy head 122 124 (push nil termlist1) 123 125 (push nil termlist2) 124 (fast-add-to termlist1 termlist2 )126 (fast-add-to termlist1 termlist2 order1) 125 127 ;; Remove dummy head 126 128 (pop termlist1)))
Note:
See TracChangeset
for help on using the changeset viewer.