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


Ignore:
Timestamp:
2015-06-20T19:44:06-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/polynomial.lisp

    r2768 r2769  
    153153  `(defmethod ,add/subtract-method-name ((self poly) (other poly))
    154154     ,@(when doc-string-supplied-p `(,doc-string))
    155      (with-slots ((termlist1 termlist) (order1 order))
    156          self
    157        (with-slots ((termlist2 termlist) (order2 order))
    158            other
    159          ;; Ensure orders are compatible
    160          (unless (eq order1 order2)
    161            (setf termlist2 (sort termlist2 order1)
    162                  order2 order1))
    163          (setf termlist1 (fast-add/subtract
    164                           termlist1 termlist2 #'order1
    165                           #',add/subtract-method-name
    166                           ,(when uminus-method-name `(function ,uminus-method-name))))))
     155     ;; Ensure orders are compatible
     156     (unless (eq (poly-term-order order1) (poly-term-order order2))
     157       (setf (poly-termlist other) (sort (poly-termlist other) (poly-term-order self))
     158             (poly-term-order other (poly-term-order self))))
     159     (setf (poly-termlist self)
     160           (fast-add/subtract
     161            (poly-termlist self)
     162            (poly-termlist other)
     163            (poly-term-order self)
     164            #',add/subtract-method-name
     165            ,(when uminus-method-name `(function ,uminus-method-name))))
    167166     self))
    168167
Note: See TracChangeset for help on using the changeset viewer.