- Timestamp:
- 2016-05-28T21:23:10-07:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/polynomial.lisp
r3878 r3879 292 292 self)) 293 293 294 (eval-when (:load-toplevel :execute) 295 296 (def-add/subtract-method add-to nil 297 "Adds to polynomial SELF another polynomial OTHER. 294 (defmethod add-to ((self poly) (other poly)) 295 "Adds to polynomial SELF another polynomial OTHER. 298 296 This operation destructively modifies both polynomials. 299 297 The result is stored in SELF. This implementation does 300 no consing, entirely reusing the sells of SELF and OTHER.") 301 302 (def-add/subtract-method subtract-from unary-minus 298 no consing, entirely reusing the sells of SELF and OTHER." 299 (change-term-order other self) 300 (setf (poly-termlist self) (add-termlists 301 (poly-termlist self) (poly-termlist other) 302 (poly-term-order self)))) 303 304 305 (defmethod subtract-from ((self poly) (other poly)) 303 306 "Subtracts from polynomial SELF another polynomial OTHER. 304 307 This operation destructively modifies both polynomials. 305 308 The result is stored in SELF. This implementation does 306 no consing, entirely reusing the sells of SELF and OTHER.") 307 ) 309 no consing, entirely reusing the sells of SELF and OTHER." 310 (change-term-order other self) 311 (setf (poly-termlist self) (subtract-termlists 312 (poly-termlist self) (poly-termlist other) 313 (poly-term-order self)))) 308 314 309 315 (defmethod unary-minus ((self poly))
Note:
See TracChangeset
for help on using the changeset viewer.