Changeset 848
- Timestamp:
- 2015-06-09T08:48:20-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/monomial.lisp
r847 r848 75 75 ;; NOTE: having a non-default constructor inhibits reading via #S(...) 76 76 (:constructor make-monom (&key 77 (dimension 0dimension-suppied-p)78 (initial-exponents #()initial-exponents-supplied-p)79 (initial-exponent #()initial-exponent-supplied-p)77 (dimension nil dimension-suppied-p) 78 (initial-exponents nil initial-exponents-supplied-p) 79 (initial-exponent nil initial-exponent-supplied-p) 80 80 &aux 81 (dim (cond (dimension-suppied-p dimension) 82 (initial-exponents-supplied-p (length exponents)) 83 (t (error "You must provide DIMENSION nor INITIAL-EXPONENTS")))) 81 84 (exponents (cond 82 85 ;; when exponents are supplied 83 86 (initial-exponents-supplied-p 84 (make-array (list dim ension) :initial-contents initial-exponents87 (make-array (list dim) :initial-contents initial-exponents 85 88 :element-type 'exponent)) 86 89 ;; when all exponents are to be identical 87 90 (initial-exponent-supplied-p 88 (make-array (list dim ension) :initial-element initial-exponent91 (make-array (list dim) :initial-element initial-exponent 89 92 :element-type 'exponent)) 90 93 ;; otherwise, all exponents are zero 91 (t (make-array (list dim ension) :element-type 'exponent :initial-element 0))))))94 (t (make-array (list dim) :element-type 'exponent :initial-element 0)))))) 92 95 ) 93 96 (exponents nil :type (vector exponent *)))
Note:
See TracChangeset
for help on using the changeset viewer.