Changeset 3502
- Timestamp:
- 2015-09-05T11:07:43-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/polynomial.lisp
r3501 r3502 120 120 self)) 121 121 122 (defmethod append-item ((self poly) (item term)) 123 (cond ((null (poly-dimension self)) 124 (setf (poly-dimension self) (monom-dimension item))) 125 (t (assert (= (poly-dimension self) (monom-dimension item))))) 126 (setf (cdr (last (poly-termlist self))) (list item)) 127 self) 122 (defgeneric poly-append-term (self monom coeff) 123 (:method ((self poly) (monom monom) coeff) 124 (cond ((null (poly-dimension self)) 125 (setf (poly-dimension self) (monom-dimension monom))) 126 (t (assert (= (poly-dimension self) (monom-dimension monom))))) 127 (setf (cdr (last (poly-termlist self))) (list (cons monom coeff))) 128 self)) 128 129 129 130 ;; Leading term … … 413 414 ;; of each termlist. 414 415 (flet ((subtract-1 (p) 415 (append-item p (make-instance ' term :coeff -1 :dimension nvars))))416 (append-item p (make-instance 'monom :coeff -1 :dimension nvars)))) 416 417 (setf plist (mapc #'subtract-1 plist))) 417 418 plist)
Note:
See TracChangeset
for help on using the changeset viewer.