- Timestamp:
- 2015-06-17T18:10:22-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/monom.lisp
r2037 r2038 146 146 (monom-total-degree m start end)) 147 147 148 (defmethod ring-mul ((m1 monom) (m2 monom)) &aux (result (copy-seq m1))) 149 "Multiply monomial M1 by monomial M2." 150 (with-slots ((exponents1 exponents)) 151 m1 152 (with-slots ((exponents2 exponents)) 153 m2 154 (let* ((exponents (copy-seq exponents1)) 155 (dim (reduce #'+ exponents))) 156 (map-into exponents #'+ exponents1 exponents2) 157 (make-instance 'monom :dim dim :exponents exponents))))) 158 148 159 (defmethod ring-div ((m1 monom) (m2 monom)) 149 160 "Divide monomial M1 by monomial M2." … … 157 168 (make-instance 'monom :dim dim :exponents exponents))))) 158 169 159 #| 160 (defun monom-mul (m1 m2 &aux (result (copy-seq m1))) 161 "Multiply monomial M1 by monomial M2." 162 (declare (type monom m1 m2 result)) 163 (map-into result #'+ m1 m2)) 170 164 171 165 172 (defun monom-divides-p (m1 m2)
Note:
See TracChangeset
for help on using the changeset viewer.