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 3689 for branches


Ignore:
Timestamp:
2015-09-06T05:58:31-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/polynomial.lisp

    r3688 r3689  
    178178  (:method ((self poly))
    179179    (length (poly-termlist self))))
     180
     181(defgeneric scalar-multiply-by (self other)
     182  (:documentation "Multiply vector SELF by a scalar OTHER.")
     183  (:method ((self poly) other)
     184    (mapc #'(lambda (term) (setf (term-coeff term) (multiply (term-coeff term) other)))
     185          (poly-termlist self))
     186    self))
     187
     188(defgeneric scalar-divide-by (self other)
     189  (:documentation "Divide vector SELF by a scalar OTHER.")
     190  (:method ((self poly) other)
     191    (mapc #'(lambda (term) (setf (term-coeff term) (divide (term-coeff term) other)))
     192          (poly-termlist self))
     193    self))
    180194
    181195(defmethod multiply-by ((self poly) (other monom))
Note: See TracChangeset for help on using the changeset viewer.