- Timestamp:
- 2015-06-08T20:31:40-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/monomial.lisp
r726 r727 73 73 (defstruct (monom 74 74 ;; BOA constructor 75 (:constructor make-monom ( dim75 (:constructor make-monom (dimension 76 76 &key 77 77 (initial-contents #() initial-contents-supplied-p) … … 79 79 (exponents (cond 80 80 (initial-contents-supplied-p 81 (make-array (list dim ) :initial-contents initial-contents81 (make-array (list dimension) :initial-contents initial-contents 82 82 :element-type 'exponent)) 83 83 (initial-element-supplied-p 84 (make-array (list dim ) :initial-element initial-element84 (make-array (list dimension) :initial-element initial-element 85 85 :element-type 'exponent)) 86 (t (make-array (list dim ) :element-type 'exponent :initial-element 0)))))))87 (dim 0 :type fixnum)86 (t (make-array (list dimension) :element-type 'exponent :initial-element 0))))))) 87 (dimension 0 :type fixnum) 88 88 (exponents nil :type (vector exponent *))) 89 90 91 92 #|93 89 94 90 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; … … 100 96 (defmacro monom-elt (m index) 101 97 "Return the power in the monomial M of variable number INDEX." 102 `(elt ,m ,index)) 103 104 (defun monom-dimension (m) 105 "Return the number of variables in the monomial M." 106 (length m)) 98 `(elt (monom-exponents ,m) ,index)) 107 99 108 100 (defun monom-total-degree (m &optional (start 0) (end (length m)))
Note:
See TracChangeset
for help on using the changeset viewer.