Changeset 2790
- Timestamp:
- 2015-06-20T21:12:20-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/polynomial.lisp
r2789 r2790 190 190 (mapc #'unary-minus (poly-termlist self)) 191 191 self) 192 193 194 (defun term-mul-lst (ring term1 term2) 195 "A special version of term multiplication. Returns (LIST TERM) where 196 TERM is the product of the terms TERM1 TERM2, or NIL when the product 197 is 0. This definition takes care of divisors of 0 in the coefficient 198 ring." 199 (let ((c (r* (term-coeff term1) (term-coeff term2)))) 200 (unless (r-zerop c) 201 (list (make-instance 'term 202 :monom (r* (term-monom term1) (term-monom term2)) 203 :coeff c))))) 204 205 (defun multiply-term-by-termlist (term termlist) 206 (mapcan #'(lambda (term-termlist) (term-mul-lst term term-termlist)) termlist)) 207 208 (defun multiply-termlist-by-term (termlist term) 209 (mapcan #'(lambda (term-termlist) (term-mul-lst term-termlist term)) termlist)) 192 210 193 211
Note:
See TracChangeset
for help on using the changeset viewer.