Changeset 3622 for branches/f4grobner
- Timestamp:
- 2015-09-05T20:16:00-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/polynomial.lisp
r3621 r3622 86 86 87 87 (defgeneric poly-insert-term (self term) 88 (:documentation "Insert a term into SELF before all other88 (:documentation "Insert a term TERM into SELF before all other 89 89 terms. Order is not enforced.") 90 90 (:method ((self poly) (term term)) … … 95 95 self)) 96 96 97 (defgeneric poly-append-term (self monom coeff) 98 (:documentation "Append a term with monomial MONOM and coefficient COEFF 99 after all other terms. Order is not enforced.") 100 (:method ((self poly) (monom monom) coeff) 97 (defgeneric poly-append-term (self term) 98 (:documentation "Append a term TERM to SELF after all other terms. Order is not enforced.") 99 (:method ((self poly) (term term)) 101 100 (cond ((null (poly-dimension self)) 102 (setf (poly-dimension self) (monom-dimension monom)))103 (t (assert (= (poly-dimension self) (monom-dimension monom)))))104 (setf (cdr (last (poly-termlist self))) (list (cons monom coeff)))101 (setf (poly-dimension self) (monom-dimension term))) 102 (t (assert (= (poly-dimension self) (monom-dimension term))))) 103 (setf (cdr (last (poly-termlist self))) (list term)) 105 104 self)) 106 105
Note:
See TracChangeset
for help on using the changeset viewer.