Changeset 716 for branches/f4grobner
- Timestamp:
- 2015-06-08T18:53:24-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/monomial.lisp
r715 r716 72 72 73 73 (defstruct (monom) 74 "Type of monomial." 75 (exponents :type (simple-array exponent (*)))) 76 77 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 78 ;; 79 ;; Construction of monomials 80 ;; 81 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 82 83 (defmacro make-monom (dim &key (initial-contents nil initial-contents-supplied-p) 84 (initial-element 0 initial-element-supplied-p)) 85 "Make a monomial with DIM variables. Additional argument 86 INITIAL-CONTENTS specifies the list of powers of the consecutive 87 variables. The alternative additional argument INITIAL-ELEMENT 88 specifies the common power for all variables." 89 ;;(declare (fixnum dim)) 90 `(make-array ,dim 91 :element-type 'exponent 92 ,@(when initial-contents-supplied-p `(:initial-contents ,initial-contents)) 93 ,@(when initial-element-supplied-p `(:initial-element ,initial-element)))) 94 74 (dim 0 :type fixnum) 75 (exponents 76 :type (simple-array exponent (*)) 77 :initform `(make-array dim 78 :element-type 'exponent 79 ,@(when initial-contents-supplied-p `(:initial-contents ,initial-contents)) 80 ,@(when initial-element-supplied-p `(:initial-element ,initial-element))))) 95 81 96 82 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Note:
See TracChangeset
for help on using the changeset viewer.