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 4092 for branches/f4grobner


Ignore:
Timestamp:
2016-06-01T10:15:55-07:00 (8 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/polynomial.lisp

    r4071 r4092  
    374374  self)
    375375 
     376(defmethod add-to ((self poly) (other term))
     377  "Adds to polynomial SELF a term OTHER. This operation
     378destructively modifies OTHER."
     379  (with-slots (termlist order)
     380      self
     381    (setf termlist (merge 'list termlist (list other) order))))
    376382
    377383(defmethod subtract-from ((self poly) (other poly))
     
    418424     (multiply-term-by-termlist-dropping-zeros (car q) p t))
    419425    (t
    420      (cons (multiply (car p) (car q))
     426     (cons (multiply-by (car p) (car q))
    421427           (add-termlists
    422428            (multiply-term-by-termlist-dropping-zeros (car p) (cdr q))
     
    537543        (declare (ignore c))
    538544        (subtract
    539          (multiply f (change-class mf 'term :coeff cg))
    540          (multiply g (change-class mg 'term :coeff cf)))))))
     545         (multiply-by f (change-class mf 'term :coeff cg))
     546         (multiply-by g (change-class mg 'term :coeff cf)))))))
    541547
    542548(defgeneric poly-content (object)
Note: See TracChangeset for help on using the changeset viewer.