Changeset 2195 for branches/f4grobner
- Timestamp:
- 2015-06-18T09:07:56-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/monom.lisp
r2194 r2195 133 133 (defmethod r* ((m1 monom) (m2 monom)) 134 134 "Multiply monomial M1 by monomial M2." 135 (with-slots ((exponents1 exponents) dim )135 (with-slots ((exponents1 exponents) dimension) 136 136 m1 137 137 (with-slots ((exponents2 exponents)) … … 139 139 (let* ((exponents (copy-seq exponents1))) 140 140 (map-into exponents #'+ exponents1 exponents2) 141 (make-instance 'monom :dim dim:exponents exponents)))))141 (make-instance 'monom :dimension dimension :exponents exponents))))) 142 142 143 143 … … 150 150 m2 151 151 (let* ((exponents (copy-seq exponents1)) 152 (dim (reduce #'+ exponents)))152 (dimension (reduce #'+ exponents))) 153 153 (map-into exponents #'- exponents1 exponents2) 154 (make-instance 'monom :dim dim:exponents exponents)))))154 (make-instance 'monom :dimension dimension :exponents exponents))))) 155 155 156 156 (defmethod r-divides-p ((m1 monom) (m2 monom)) … … 221 221 m2 222 222 (let* ((exponents (copy-seq exponents1)) 223 (dim (reduce #'+ exponents)))223 (dimension (reduce #'+ exponents))) 224 224 (map-into exponents #'max exponents1 exponents2) 225 (make-instance 'monom :dim dim :exponents exponents)))))225 (make-instance 'monom :dim dimension :exponents exponents))))) 226 226 227 227 … … 233 233 m2 234 234 (let* ((exponents (copy-seq exponents1)) 235 (dim (reduce #'+ exponents)))235 (dimension (reduce #'+ exponents))) 236 236 (map-into exponents #'min exponents1 exponents2) 237 (make-instance 'monom :dim dim :exponents exponents)))))237 (make-instance 'monom :dim dimension :exponents exponents))))) 238 238 239 239 (defmethod r-depends-p ((m monom) k) … … 245 245 246 246 (defmethod r-tensor-product ((m1 monom) (m2 monom) 247 &aux (dim (+ (r-dimension m1) (r-dimension m2))))248 (declare (fixnum dim ))247 &aux (dimension (+ (r-dimension m1) (r-dimension m2)))) 248 (declare (fixnum dimension)) 249 249 (with-slots ((exponents1 exponents)) 250 250 m1 … … 252 252 m2 253 253 (make-instance 'monom 254 :dim dim254 :dimension dimension 255 255 :exponents (concatenate 'vector exponents1 exponents2))))) 256 256
Note:
See TracChangeset
for help on using the changeset viewer.