- Timestamp:
- 2015-06-19T10:04:24-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/polynomial.lisp
r2446 r2447 134 134 (length (poly-termlist self))) 135 135 136 (defmethod scalar-multiply((self poly) scalar)136 (defmethod multiply-by-scalar ((self poly) scalar) 137 137 "The scalar product of a polynomial SELF by a scalar SCALAR." 138 (mapc #'(lambda (term) ( scalar-multiplyterm scalar)) (poly-termlist self))138 (mapc #'(lambda (term) (multiply-by-scalar term scalar)) (poly-termlist self)) 139 139 self) 140 140 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 152 145 153 146 (defun term-times-poly (ring term p)
Note:
See TracChangeset
for help on using the changeset viewer.