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 716


Ignore:
Timestamp:
2015-06-08T18:53:24-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/monomial.lisp

    r715 r716  
    7272
    7373(defstruct (monom)
    74   "Type of monomial."
    75   (exponents :type (simple-array exponent (*))))
    76 
    77 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    78 ;;
    79 ;; Construction of monomials
    80 ;;
    81 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    82 
    83 (defmacro make-monom (dim &key (initial-contents nil initial-contents-supplied-p)
    84                                (initial-element 0 initial-element-supplied-p))
    85   "Make a monomial with DIM variables. Additional argument
    86 INITIAL-CONTENTS specifies the list of powers of the consecutive
    87 variables. The alternative additional argument INITIAL-ELEMENT
    88 specifies the common power for all variables."
    89   ;;(declare (fixnum dim))
    90   `(make-array ,dim
    91                :element-type 'exponent
    92                ,@(when initial-contents-supplied-p `(:initial-contents ,initial-contents))
    93                ,@(when initial-element-supplied-p `(:initial-element ,initial-element))))
    94 
     74  (dim 0 :type fixnum)
     75  (exponents
     76   :type (simple-array exponent (*))
     77   :initform `(make-array dim
     78                          :element-type 'exponent
     79                          ,@(when initial-contents-supplied-p `(:initial-contents ,initial-contents))
     80                          ,@(when initial-element-supplied-p `(:initial-element ,initial-element)))))
    9581
    9682;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Note: See TracChangeset for help on using the changeset viewer.