Changeset 2446 for branches/f4grobner
- Timestamp:
- 2015-06-19T09:58:49-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/polynomial.lisp
r2445 r2446 134 134 (length (poly-termlist self))) 135 135 136 (defun poly-reset-sugar (p) 137 "(Re)sets the sugar of a polynomial P to the sugar of (POLY-TERMLIST P). 138 Thus, the sugar is set to the maximum sugar of all monomials of P, or -1 139 if P is a zero polynomial." 140 (declare (type poly p)) 141 (setf (poly-sugar p) (termlist-sugar (poly-termlist p))) 142 p) 143 144 (defun scalar-times-poly (ring c p) 145 "The scalar product of scalar C by a polynomial P. The sugar of the 146 original polynomial becomes the sugar of the result." 147 (declare (type ring ring) (type poly p)) 148 (make-poly-from-termlist (scalar-times-termlist ring c (poly-termlist p)) (poly-sugar p))) 136 (defmethod scalar-multiply ((self poly) scalar) 137 "The scalar product of a polynomial SELF by a scalar SCALAR." 138 (mapc #'(lambda (term) (scalar-multiply term scalar)) (poly-termlist self)) 139 self) 149 140 150 141 (defun scalar-times-poly-1 (ring c p)
Note:
See TracChangeset
for help on using the changeset viewer.