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 2779 for branches


Ignore:
Timestamp:
2015-06-20T20:22:42-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/monom.lisp

    r2778 r2779  
    5151
    5252(defclass monom ()
    53   ((dimension          :initarg :dimension :accessor r-dimension)
    54    (exponents :initarg :exponents :accessor r-exponents))
    55   (:default-initargs :dimension nil :exponents nil :exponent nil))
     53  ((dimension          :initarg :dimension :accessor monom-dimension)
     54   (exponents :initarg :exponents :accessor monom-exponents))
     55  (:default-initargs :dimension nil :exponents nil :exponent nil)
     56  (:documentation
     57   "Implements a monomial, i.e. a product of powers
     58of variables, like X*Y^2."))
    5659
    5760(defmethod print-object ((self monom) stream)
    5861  (format stream "#<MONOM DIMENSION=~A EXPONENTS=~A>"
    59           (r-dimension self)
    60           (r-exponents self)))
     62          (monom-dimension self)
     63          (monom-exponents self)))
    6164
    6265(defmethod shared-initialize :after ((self monom) slot-names
     
    97100EXPONENTS."
    98101  (declare (type monom m1 m2))
    99   (equalp (r-exponents m1) (r-exponents m2)))
     102  (equalp (monom-exponents m1) (monom-exponents m2)))
    100103
    101104(defmethod r-coeff ((m monom))
     
    116119    (setf (elt exponents index) new-value)))
    117120
    118 (defmethod r-total-degree ((m monom) &optional (start 0) (end (r-dimension m)))
     121(defmethod r-total-degree ((m monom) &optional (start 0) (end (monom-dimension m)))
    119122  "Return the todal degree of a monomoal M. Optinally, a range
    120123of variables may be specified with arguments START and END."
     
    125128
    126129
    127 (defmethod r-sugar ((m monom) &aux (start 0) (end (r-dimension m)))
     130(defmethod r-sugar ((m monom) &aux (start 0) (end (monom-dimension m)))
    128131  "Return the sugar of a monomial M. Optinally, a range
    129132of variables may be specified with arguments START and END."
     
    278281(defmethod r->list ((m monom))
    279282  "A human-readable representation of a monomial M as a list of exponents." 
    280   (coerce (r-exponents m) 'list))
     283  (coerce (monom-exponents m) 'list))
Note: See TracChangeset for help on using the changeset viewer.