Changeset 3506 for branches/f4grobner
- Timestamp:
- 2015-09-05T11:13:53-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/polynomial.lisp
r3505 r3506 155 155 156 156 (defmethod multiply-by ((self poly) (other monom)) 157 (mapc #'(lambda (term) (multiply-by term other))158 (poly-termlist self))159 self)160 161 (defmethod multiply-by ((self poly) (other term))162 157 (mapc #'(lambda (term) (multiply-by term other)) 163 158 (poly-termlist self)) … … 314 309 (change-class (reduce #'r+ subtrahends) 'poly))) 315 310 316 (defmethod r+ ((poly1 term) poly2)317 "Non-destructively add POLY1 by POLY2."318 (add-to (change-class (copy-instance poly1) 'poly)319 (change-class (copy-instance poly2) 'poly)))320 321 (defmethod r- ((minuend term) &rest subtrahends)322 "Non-destructively subtract MINUEND and SUBTRAHENDS."323 (subtract-from (change-class (copy-instance minuend) 'poly)324 (change-class (reduce #'r+ subtrahends) 'poly)))325 326 311 (defmethod r+ ((poly1 monom) poly2) 327 312 "Non-destructively add POLY1 by POLY2." … … 337 322 "Non-destructively multiply POLY1 by POLY2." 338 323 (multiply-by (copy-instance poly1) (copy-instance poly2))) 339 340 (defmethod left-tensor-product-by ((self poly) (other term))341 (setf (poly-termlist self)342 (mapcan #'(lambda (term)343 (let ((prod (left-tensor-product-by term other)))344 (cond345 ((r-zerop prod) nil)346 (t (list prod)))))347 (poly-termlist self)))348 self)349 350 (defmethod right-tensor-product-by ((self poly) (other term))351 (setf (poly-termlist self)352 (mapcan #'(lambda (term)353 (let ((prod (right-tensor-product-by term other)))354 (cond355 ((r-zerop prod) nil)356 (t (list prod)))))357 (poly-termlist self)))358 self)359 324 360 325 (defmethod left-tensor-product-by ((self poly) (other monom))
Note:
See TracChangeset
for help on using the changeset viewer.