Changeset 3443 for branches/f4grobner
- Timestamp:
- 2015-09-05T09:12:44-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/monom.lisp
r3442 r3443 125 125 (error "Initarg DIMENSION or EXPONENTS must be supplied.")))) 126 126 127 (defmethod monom-dimension (m) 128 (length (monom-exponents ,m))) 129 130 (defmethod monom-equalp (m1 m2) 131 "Returns T iff monomials M1 and M2 have identical 132 EXPONENTS." 133 `(equalp (monom-exponents ,m1) (monom-exponents ,m2))) 134 135 (defmethod monom-elt (m index) 136 "Return the power in the monomial M of variable number INDEX." 137 (with-slots (exponents) 138 m 139 (elt exponents index))) 140 141 (defmethod (setf monom-elt) (new-value m index) 142 "Return the power in the monomial M of variable number INDEX." 143 (with-slots (exponents) 144 m 145 (setf (elt exponents index) new-value))) 127 (defgeneric monom-dimension (m) 128 (:method ((m monom)) 129 (length (monom-exponents m)))) 130 131 (defgeneric monom-equalp (m1 m2) 132 (:documentation "Returns T iff monomials M1 and M2 have identical EXPONENTS.") 133 (:method ((m1 monom) (m2 monom)) 134 `(equalp (monom-exponents ,m1) (monom-exponents ,m2)))) 135 136 (defgeneric monom-elt (m index) 137 (:documentation 138 "Return the power in the monomial M of variable number INDEX.") 139 (:method ((m monom) index) 140 (with-slots (exponents) 141 m 142 (elt exponents index)))) 143 144 (defgeneric (setf monom-elt) (new-value m index) 145 (:documentation "Return the power in the monomial M of variable number INDEX.") 146 (:method (new-value (m monom) index) 147 (with-slots (exponents) 148 m 149 (setf (elt exponents index) new-value))) 146 150 147 151 (defmethod monom-total-degree (m &optional (start 0) (end (monom-dimension m)))
Note:
See TracChangeset
for help on using the changeset viewer.