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.

Ignore:
Timestamp:
2015-06-18T09:28:59-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/monom.lisp

    r2203 r2204  
    6666(defmethod make-instance :before ((self monom)
    6767                                  (dimension nil dimension-suppied-p)
    68                                   (initial-exponents nil initial-exponents-supplied-p)
    69                                   (initial-exponent  nil initial-exponent-supplied-p))
     68                                  (exponents nil exponents-supplied-p)
     69                                  (exponent  nil exponent-supplied-p))
    7070  "A constructor (factory) of monomials. If DIMENSION is given, a
    7171sequence of DIMENSION elements of type EXPONENT is constructed, where
    72 individual elements are the value of INITIAL-EXPONENT, which defaults
     72individual elements are the value of EXPONENT, which defaults
    7373to 0.  Alternatively, all elements may be specified as a list
    74 INITIAL-EXPONENTS."
     74EXPONENTS."
    7575  (with-slots (dimension exponents)
    7676      self
    7777    (setf dimension (cond (dimension-suppied-p dimension)
    78                           (initial-exponents-supplied-p (length initial-exponents))
    79                           (t (error "You must provide DIMENSION or INITIAL-EXPONENTS")))
     78                          (exponents-supplied-p (length exponents))
     79                          (t (error "You must provide DIMENSION or EXPONENTS")))
    8080          exponents (cond
    8181                      ;; when exponents are supplied
    82                       (initial-exponents-supplied-p
    83                        (when (and dimension-suppied-p (/= dimension (length initial-exponents)))
    84                          (error "INITIAL-EXPONENTS must have length DIMENSION"))
    85                        (make-array (list dimension) :initial-contents initial-exponents
     82                      (exponents-supplied-p
     83                       (when (and dimension-suppied-p (/= dimension (length exponents)))
     84                         (error "EXPONENTS must have length DIMENSION"))
     85                       (make-array (list dimension) :initial-contents exponents
    8686                                   :element-type 'exponent))
    8787                      ;; when all exponents are to be identical
    88                       (initial-exponent-supplied-p
    89                        (make-array (list dimension) :initial-element initial-exponent
     88                      (exponent-supplied-p
     89                       (make-array (list dimension) :element exponent
    9090                                   :element-type 'exponent))
    9191                      ;; otherwise, all exponents are zero
    9292                      (t
    93                        (make-array (list dimension) :element-type 'exponent :initial-element 0)))))
     93                       (make-array (list dimension) :element-type 'exponent :element 0)))))
    9494  (call-next-method))
    9595
Note: See TracChangeset for help on using the changeset viewer.