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


Ignore:
Timestamp:
2015-06-19T10:04:24-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/polynomial.lisp

    r2446 r2447  
    134134  (length (poly-termlist self)))
    135135
    136 (defmethod scalar-multiply ((self poly) scalar)
     136(defmethod multiply-by-scalar ((self poly) scalar)
    137137  "The scalar product of a polynomial SELF by a scalar SCALAR."
    138   (mapc #'(lambda (term) (scalar-multiply term scalar)) (poly-termlist self))
     138  (mapc #'(lambda (term) (multiply-by-scalar term scalar)) (poly-termlist self))
    139139  self)
    140140
    141 (defun scalar-times-poly-1 (ring c p)
    142   "The scalar product of scalar C by a polynomial P, omitting the head term. The sugar of the
    143 original polynomial becomes the sugar of the result."
    144   (declare (type ring ring) (type poly p))
    145   (make-poly-from-termlist (scalar-times-termlist ring c (cdr (poly-termlist p))) (poly-sugar p)))
    146 
    147 (defun monom-times-poly (m p)
    148   (declare (type monom m) (type poly p))
    149   (make-poly-from-termlist
    150    (monom-times-termlist m (poly-termlist p))
    151    (+ (poly-sugar p) (monom-sugar m))))
     141(defun multiply-by-monom ((self poly) (monom monom))
     142  (mapc #'(lambda (term) (r* term monom)) (poly-termlist self))
     143  self)
     144
    152145
    153146(defun term-times-poly (ring term p)
Note: See TracChangeset for help on using the changeset viewer.