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 727


Ignore:
Timestamp:
2015-06-08T20:31:40-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/monomial.lisp

    r726 r727  
    7373(defstruct (monom
    7474             ;; BOA constructor
    75              (:constructor make-monom ( dim
     75             (:constructor make-monom (dimension
    7676                                        &key
    7777                                        (initial-contents #() initial-contents-supplied-p)
     
    7979                                        (exponents (cond
    8080                                                     (initial-contents-supplied-p
    81                                                       (make-array (list dim) :initial-contents initial-contents
     81                                                      (make-array (list dimension) :initial-contents initial-contents
    8282                                                                  :element-type 'exponent))
    8383                                                     (initial-element-supplied-p
    84                                                       (make-array (list dim) :initial-element initial-element
     84                                                      (make-array (list dimension) :initial-element initial-element
    8585                                                                  :element-type 'exponent))
    86                                                      (t (make-array (list dim) :element-type 'exponent :initial-element 0)))))))
    87   (dim 0 :type fixnum)
     86                                                     (t (make-array (list dimension) :element-type 'exponent :initial-element 0)))))))
     87  (dimension 0 :type fixnum)
    8888  (exponents nil :type (vector exponent *)))
    89 
    90  
    91 
    92 #|
    9389
    9490;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     
    10096(defmacro monom-elt (m index)
    10197  "Return the power in the monomial M of variable number INDEX."
    102   `(elt ,m ,index))
    103 
    104 (defun monom-dimension (m)
    105   "Return the number of variables in the monomial M."
    106   (length m))
     98  `(elt (monom-exponents ,m) ,index))
    10799
    108100(defun monom-total-degree (m &optional (start 0) (end (length m)))
Note: See TracChangeset for help on using the changeset viewer.