Changeset 2085 for branches/f4grobner
- Timestamp:
- 2015-06-17T19:40:55-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/monom.lisp
r2084 r2085 260 260 (plusp (elt exponents k)))) 261 261 262 (defmacro monom-map (fun m &rest ml &aux (result `(copy-seq ,m))) 263 "Map function FUN of one argument over the powers of a monomial M. 264 Fun should map a single FIXNUM argument to FIXNUM. Return a sequence 265 of results." 266 `(map-into ,result ,fun ,m ,@ml)) 267 268 (defun monom-append (m1 m2 &aux (dim (+ (length m1) (length m2)))) 269 (declare (type monom m1 m2) (fixnum dim)) 270 (concatenate `(monom ,dim) m1 m2)) 271 272 (defun monom-contract (m k) 262 (defmethod tensor-mul ((m1 monom) (m2 monom) 263 &aux (dim (+ (dimension m1) (dimension m2)))) 264 (declare (fixnum dim)) 265 (make-instance 'monom :dim dim 266 :exponents (concatenate 'vector exponents1 exponents2))) 267 268 (defmethod contract ((m monom) k) 273 269 "Drop the first K variables in monomial M." 274 (declare (type monom m) (fixnum k)) 275 (subseq m k)) 270 (declare (fixnum k)) 271 (with-slots (dim exponents) 272 m 273 (setf dim (- dim k) 274 exponents (subseq exponents k)))) 276 275 277 276 (defun make-monom-variable (nvars pos &optional (power 1)
Note:
See TracChangeset
for help on using the changeset viewer.