Changeset 4511 for branches/f4grobner/polynomial-sugar.lisp
- Timestamp:
- 2016-06-17T11:46:43-07:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/polynomial-sugar.lisp
r4510 r4511 11 11 (with-slots (termlist) 12 12 object 13 (loop for trm in termlist maximize (s ugar trm)))))13 (loop for trm in termlist maximize (static-sugar trm))))) 14 14 15 15 (defclass sugar () … … 32 32 (setf (slot-value self 'value) (static-sugar self))) 33 33 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 34 42 (defclass term-with-sugar (term sugar) ()) 35 43 … … 44 52 45 53 (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." 47 55 (declare (ignore slot-names initargs)) 48 56 (setf (slot-value self 'value) (static-sugar self)))
Note:
See TracChangeset
for help on using the changeset viewer.