Changeset 2154 for branches/f4grobner
- Timestamp:
- 2015-06-17T21:36:03-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/monom.lisp
r2153 r2154 107 107 (with-slots (exponents) 108 108 m 109 ( cl:elt exponents index)))109 (elt exponents index))) 110 110 111 111 (defmethod (setf r-elt) (new-value (m monom) index) … … 113 113 (with-slots (exponents) 114 114 m 115 (setf ( cl:elt exponents index) new-value)))115 (setf (elt exponents index) new-value))) 116 116 117 117 (defmethod r-total-degree ((m monom) &optional (start 0) (end (r-dimension m))) … … 121 121 (with-slots (exponents) 122 122 m 123 (reduce #' cl:+ exponents :start start :end end)))123 (reduce #'+ exponents :start start :end end))) 124 124 125 125 … … 137 137 m2 138 138 (let* ((exponents (copy-seq exponents1)) 139 (dim (reduce #' cl:+ exponents)))140 (map-into exponents #' cl:+ exponents1 exponents2)139 (dim (reduce #'+ exponents))) 140 (map-into exponents #'+ exponents1 exponents2) 141 141 (make-instance 'monom :dim dim :exponents exponents))))) 142 142 … … 150 150 m2 151 151 (let* ((exponents (copy-seq exponents1)) 152 (dim (reduce #' cl:+ exponents)))153 (map-into exponents #' cl:- exponents1 exponents2)152 (dim (reduce #'+ exponents))) 153 (map-into exponents #'- exponents1 exponents2) 154 154 (make-instance 'monom :dim dim :exponents exponents))))) 155 155 … … 203 203 (with-slots (exponents2 exponents) 204 204 m2 205 (every #'(lambda (x y) ( cl:zerop (min x y))) exponents1 exponents2))))205 (every #'(lambda (x y) (zerop (min x y))) exponents1 exponents2)))) 206 206 207 207 … … 221 221 m2 222 222 (let* ((exponents (copy-seq exponents1)) 223 (dim (reduce #' cl:+ exponents)))223 (dim (reduce #'+ exponents))) 224 224 (map-into exponents #'max exponents1 exponents2) 225 225 (make-instance 'monom :dim dim :exponents exponents))))) … … 233 233 m2 234 234 (let* ((exponents (copy-seq exponents1)) 235 (dim (reduce #' cl:+ exponents)))235 (dim (reduce #'+ exponents))) 236 236 (map-into exponents #'min exponents1 exponents2) 237 237 (make-instance 'monom :dim dim :exponents exponents))))) … … 242 242 (with-slots (exponents) 243 243 m 244 (plusp ( cl:elt exponents k))))244 (plusp (elt exponents k)))) 245 245 246 246 (defmethod r-tensor-product ((m1 monom) (m2 monom) 247 &aux (dim ( cl:+ (r-dimension m1) (r-dimension m2))))247 &aux (dim (+ (r-dimension m1) (r-dimension m2)))) 248 248 (declare (fixnum dim)) 249 249 (with-slots (exponents1 exponents) … … 273 273 (with-slots (exponents) 274 274 m 275 (setf ( cl:elt exponents pos) power)275 (setf (elt exponents pos) power) 276 276 m)) 277 277
Note:
See TracChangeset
for help on using the changeset viewer.