- Timestamp:
- 2016-06-01T12:40:24-07:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/polynomial.lisp
r4103 r4104 388 388 389 389 (defmethod add-to ((self poly) (other term)) 390 "Adds to a polynomial SELF a term OTHER. This operation 391 destructively modifies OTHER. This operation observes the order of terms." 392 (with-slots (termlist order) 393 self 394 (setf termlist (merge 'list termlist (list other) order)))) 390 "Adds to a polynomial SELF a term OTHER." 391 (add-to self (change-class (copy-instance other) 'poly))) 395 392 396 393 (defmethod subtract-from ((self poly) (other term)) 397 "Subtracts from a polynomial SELF a term OTHER. This operation 398 destructively modifies OTHER." 399 (with-slots (termlist order) 400 self 401 (setf termlist (merge 'list termlist (list other) order)))) 402 394 "Subtracts from a polynomial SELF a term OTHER." 395 (subtract-from self (change-class (copy-instance other) 'poly))) 403 396 404 397
Note:
See TracChangeset
for help on using the changeset viewer.