close Warning: Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.

Changeset 4103


Ignore:
Timestamp:
2016-06-01T12:37:24-07:00 (8 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/polynomial.lisp

    r4101 r4103  
    374374  self)
    375375 
    376 (defmethod add-to ((self poly) (other term))
    377   "Adds to polynomial SELF a term OTHER. This operation
    378 destructively modifies OTHER."
    379   (with-slots (termlist order)
    380       self
    381     (setf termlist (merge 'list termlist (list other) order))))
    382376
    383377(defmethod subtract-from ((self poly) (other poly))
     
    391385                              (poly-term-order self)))
    392386  self)
     387
     388
     389(defmethod add-to ((self poly) (other term))
     390  "Adds to a polynomial SELF a term OTHER. This operation
     391destructively 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))))
     395
     396(defmethod subtract-from ((self poly) (other term))
     397  "Subtracts from a polynomial SELF a term OTHER. This operation
     398destructively modifies OTHER."
     399  (with-slots (termlist order)
     400      self
     401    (setf termlist (merge 'list termlist (list other) order))))
     402
     403
    393404
    394405(defmacro multiply-term-by-termlist-dropping-zeros (term termlist
Note: See TracChangeset for help on using the changeset viewer.