Changeset 3553
- Timestamp:
- 2015-09-05T16:36:51-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/monom.lisp
r3552 r3553 174 174 (total-degree m start end))) 175 175 176 (defgeneric universal-multiply-by (self other)176 (defgeneric multiply-by (self other) 177 177 (:documentation "Multiply SELF by OTHER, return SELF.") 178 178 (:method ((self monom) (other monom)) … … 186 186 self)) 187 187 188 (defgeneric universal-divide-by (self other)188 (defgeneric divide-by (self other) 189 189 (:documentation "Divide SELF by OTHER, return SELF.") 190 190 (:method ((self monom) (other monom)) … … 208 208 copy)) 209 209 210 (defgeneric universal-multiply-2 (object1 object2)210 (defgeneric multiply-2 (object1 object2) 211 211 (:documentation "Multiply OBJECT1 by OBJECT2") 212 212 (:method (object1 object2) 213 213 (universal-multiply-by (copy-instance object1) (copy-instance object2)))) 214 214 215 (defgeneric universal-divide (numerator &rest denominators)215 (defgeneric divide (numerator &rest denominators) 216 216 (:documentation "Non-destructively divide object NUMERATOR by product of DENOMINATORS.") 217 217 (:method ((numerator monom) &rest denominators) 218 ( universal-divide-by (copy-instance numerator) (reduce #'universal-multiply-2 denominators))))218 (divide-by (copy-instance numerator) (reduce #'multiply-2 denominators)))) 219 219 220 220 (defmethod monom-divides-p ((m1 monom) (m2 monom))
Note:
See TracChangeset
for help on using the changeset viewer.