close Warning: Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.

Changeset 2356


Ignore:
Timestamp:
2015-06-18T21:04:05-07:00 (10 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/monom.lisp

    r2355 r2356  
    100100         ;; when exponents are supplied
    101101         (exponents
    102           (setf (slot-value self 'exponents)
    103                 (make-array (slot-value self 'dimension) :initial-contents exponents)))
     102          (let ((dim (length exponents)))
     103            (setf (slot-value self 'dimension) dim
     104                  (slot-value self 'exponents) (make-array dim :initial-contents exponents))))
    104105         ;; when all exponents are to be identical
    105          (exponent
    106           (setf (slot-value self 'exponents)
    107                 (make-array (list new-dimension) :initial-element exponent
    108                             :element-type 'exponent)))
    109          ;; otherwise, all exponents are zero
    110          (t
    111           (setf (slot-value self 'exponents)
    112                 (make-array (list new-dimension) :element-type 'exponent :initial-element 0))))))))
    113 
    114 
    115 
     106         (t
     107          (let ((dim (slot-value self 'dimension)))
     108            (setf (slot-value self 'exponents)
     109                  (make-array (list dim) :initial-element (or exponent 0)
     110                              :element-type 'exponent)))))))))
    116111
    117112;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Note: See TracChangeset for help on using the changeset viewer.