- Timestamp:
- 2015-06-09T08:34:58-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/monomial.lisp
r836 r837 73 73 (defstruct (monom 74 74 ;; BOA constructor 75 (:constructor make-monom (dimension 76 &key 77 (initial-exponents #() initial-exponents-supplied-p) 78 (initial-exponent #() initial-exponent-supplied-p) 79 (exponents (cond 80 ;; when exponents are supplied 81 (initial-exponents-supplied-p 82 (make-array (list dimension) :initial-contents initial-exponents 83 :element-type 'exponent)) 84 ;; when all exponents are to be identical 85 (initial-exponent-supplied-p 86 (make-array (list dimension) :initial-element initial-exponent 87 :element-type 'exponent)) 88 ;; otherwise, all exponents are zero 89 (t (make-array (list dimension) :element-type 'exponent :initial-element 0))))))) 75 ) 90 76 (exponents nil :type (vector exponent *))) 77 78 (defun monom (dimension 79 &key 80 (initial-exponents #() initial-exponents-supplied-p) 81 (initial-exponent #() initial-exponent-supplied-p) 82 (exponents (cond 83 ;; when exponents are supplied 84 (initial-exponents-supplied-p 85 (make-array (list dimension) :initial-contents initial-exponents 86 :element-type 'exponent)) 87 ;; when all exponents are to be identical 88 (initial-exponent-supplied-p 89 (make-array (list dimension) :initial-element initial-exponent 90 :element-type 'exponent)) 91 ;; otherwise, all exponents are zero 92 (t (make-array (list dimension) :element-type 'exponent :initial-element 0)))))) 91 93 92 94 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Note:
See TracChangeset
for help on using the changeset viewer.