- Timestamp:
- 2015-06-20T01:34:04-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/polynomial.lisp
r2605 r2607 91 91 self) 92 92 93 (defun fast-add-to (p q order-fn) 94 "Fast destructive addition of termlists P and Q, ordered by 95 predicate ORDER-FN. Note that this assumes the presence of a dummy 96 header." 93 94 (defun fast-addition (method-name p q order-fn add-fun) 97 95 (macrolet ((lt (x) `(cadr ,x)) 98 96 (lc (x) `(r-coeff (cadr ,x)))) … … 108 106 (rotatef (cdr p) (cdr q))) 109 107 (equal-p 110 (let ((s ( add-to(lc p) (lc q))))108 (let ((s (funcall add-fun (lc p) (lc q)))) 111 109 (if (r-zerop s) 112 110 (setf (cdr p) (cddr p)) … … 131 129 (push nil termlist1) 132 130 (push nil termlist2) 133 (fast-add -to termlist1 termlist2 order1)131 (fast-addition termlist1 termlist2 order1 #'add-to) 134 132 ;; Remove dummy head 135 133 (pop termlist1)))
Note:
See TracChangeset
for help on using the changeset viewer.