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 4513 for branches


Ignore:
Timestamp:
2016-06-17T11:57:48-07:00 (8 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/polynomial-sugar.lisp

    r4512 r4513  
    6363  (declare (ignore slot-names initargs))
    6464  (setf (slot-value self 'value) (static-sugar self)))
     65
     66(defmethod add-to ((self poly-with-sugar) (other poly-with-sugar))
     67  "Sugar value of the sum of two polynomials, SELF and OTHER, is by definition
     68the maximum of the sugar values of the two polynomials."
     69  (with-accessors ((value sugar-value))
     70      self
     71    (with-accessors ((other-value sugar-value))
     72        other
     73      (setf value (max value other-value)))))
Note: See TracChangeset for help on using the changeset viewer.