- Timestamp:
- 2015-06-23T09:11:31-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/monom.lisp
r3297 r3298 82 82 &allow-other-keys 83 83 ) 84 (when (and dimension-supplied-p (slot-accessible-p 'dimension))85 86 87 (when (and exponents-supplied-p (slot-accessible-p 'exponents))88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 :element-type 'exponent))))))84 (when dimension-supplied-p 85 (setf (slot-value self 'dimension) dimension)) 86 87 (when exponents-supplied-p 88 (let ((dim (length exponents))) 89 (when (and dimension-supplied-p (/= dimension dim)) 90 (error "EXPONENTS must have length DIMENSION")) 91 (setf (slot-value self 'dimension) dim 92 (slot-value self 'exponents) (make-array dim :initial-contents exponents)) 93 (setf (slot-value self 'dimension) (length exponents)))) 94 95 ;; when all exponents are to be identical 96 (when (and exponent-supplied-p (slot-accessible-p 'exponents)) 97 (unless (slot-boundp self 'dimension) 98 (error "Slot DIMENSION is unbound, but must be known if EXPONENT is supplied.")) 99 (let ((dim (slot-value self 'dimension))) 100 (setf (slot-value self 'exponents) 101 (make-array (list dim) :initial-element exponent 102 :element-type 'exponent))))) 103 103 104 104 (defmethod r-equalp ((m1 monom) (m2 monom))
Note:
See TracChangeset
for help on using the changeset viewer.