Changeset 2261 for branches/f4grobner
- Timestamp:
- 2015-06-18T13:51:33-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/monom.lisp
r2260 r2261 66 66 (slot-value self 'exponents))) 67 67 68 (defmethod initialize-instance :after((self monom)69 70 71 72 73 74 75 68 (defmethod initialize-instance ((self monom) 69 ;;&rest args 70 &key 71 (dimension nil dimension-suppied-p) 72 (exponents nil exponents-supplied-p) 73 (exponent nil exponent-supplied-p) 74 &allow-other-keys 75 ) 76 76 ;;(format t "INITIALIZE-INSTANCE called with:~&~TSELF:~W ~&~TARGS: ~W.~%" self args) 77 77 (let* ((new-dimension (cond (dimension-suppied-p dimension) 78 (exponents-supplied-p79 (length exponents))80 (t81 (error "You must provide DIMENSION or EXPONENTS"))))82 (new-exponents (cond83 ;; when exponents are supplied84 (exponents-supplied-p85 (make-array (list new-dimension) :initial-contents exponents86 87 ;; when all exponents are to be identical88 (exponent-supplied-p89 (make-array (list new-dimension) :initial-element exponent90 91 ;; otherwise, all exponents are zero92 (t93 (make-array (list new-dimension) :element-type 'exponent :initial-element 0)))))))78 (exponents-supplied-p 79 (length exponents)) 80 (t 81 (error "You must provide DIMENSION or EXPONENTS")))) 82 (new-exponents (cond 83 ;; when exponents are supplied 84 (exponents-supplied-p 85 (make-array (list new-dimension) :initial-contents exponents 86 :element-type 'exponent)) 87 ;; when all exponents are to be identical 88 (exponent-supplied-p 89 (make-array (list new-dimension) :initial-element exponent 90 :element-type 'exponent)) 91 ;; otherwise, all exponents are zero 92 (t 93 (make-array (list new-dimension) :element-type 'exponent :initial-element 0))))))) 94 94 95 95
Note:
See TracChangeset
for help on using the changeset viewer.