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.

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

* empty log message *

File:
1 edited

Legend:

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

    r4510 r4511  
    1111  (with-slots (termlist)
    1212        object
    13       (loop for trm in termlist maximize (sugar trm)))))
     13      (loop for trm in termlist maximize (static-sugar trm)))))
    1414
    1515(defclass sugar ()
     
    3232  (setf (slot-value self 'value) (static-sugar self)))
    3333
     34(defmethod multiply-by :after ((self sugar) (other sugar))
     35  (with-slots (value)
     36      self
     37    (with-slots ((other-value value))
     38        other
     39      (incf value other-value)))
     40  self)
     41
    3442(defclass term-with-sugar (term sugar) ())
    3543
     
    4452
    4553(defmethod shared-initialize :after ((self poly-with-sugar) slot-names &rest initargs &key)
    46   "Initialize sugar to its static value."
     54  "Initialize sugar to its static value, which is the maximum of sugar values of the terms."
    4755  (declare (ignore slot-names initargs))
    4856  (setf (slot-value self 'value) (static-sugar self)))
Note: See TracChangeset for help on using the changeset viewer.