close Warning: Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.

Changeset 3044 for branches


Ignore:
Timestamp:
2015-06-21T16:57:02-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/polynomial.lisp

    r3017 r3044  
    251251  "Non-destructively multiply POLY1 by POLY2."
    252252  (multiply-by (copy-instance POLY1) (copy-instance POLY2)))
     253
     254(defmethod left-tensor-product-by ((self poly) (other term))
     255  (setf (poly-termlist self)
     256        (mapcan #'(lambda (term)
     257                    (let ((prod (left-tensor-product-by other) term))
     258                      (cond
     259                        ((r-zerop prod) nil)
     260                        (t (list prod)))))
     261                (poly-termlist)))
     262  self)
     263
     264(defmethod right-tensor-product-by ((self poly) (other term))
     265  (setf (r-coeff self) (multiply-by (r-coeff self) (r-coeff other)))
     266  (call-next-method))
     267
    253268
    254269#|
Note: See TracChangeset for help on using the changeset viewer.