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:
2016-06-04T15:41:22-07:00 (8 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/monom.lisp

    r4168 r4225  
    2121
    2222(defpackage "MONOM"
    23   (:use :cl :utils :copy)
     23  (:use :cl :utils :copy :ring :integer-ring)
    2424  (:export "MONOM"
    2525           "TERM"
     
    145145
    146146(defgeneric universal-equalp (object1 object2)
    147   (:documentation "Returns T iff OBJECT1 and OBJECT2 are equal.")
    148   (:method ((object1 cons) (object2 cons)) (every #'universal-equalp object1 object2))
    149   (:method ((object1 number) (object2 number)) (= object1 object2))
    150147  (:method ((m1 monom) (m2 monom))
    151148    "Returns T iff monomials M1 and M2 have identical EXPONENTS."
     
    329326(defgeneric universal-gcd (object1 object2)
    330327  (:documentation "Returns GCD of objects OBJECT1 and OBJECT2")
    331   (:method ((object1 number) (object2 number)) (gcd object1 object2))
    332328  (:method ((m1 monom) (m2 monom))
    333329    "Returns greatest common divisor of monomials M1 and M2."
     
    540536
    541537(defclass term (monom)
    542   ((coeff :initarg :coeff :accessor term-coeff))
    543   (:default-initargs :coeff nil)
     538  ((coeff :initarg :coeff :initform (error "Must specify coefficient.") :accessor term-coeff :type ring))
    544539  (:documentation "Implements a term, i.e. a product of a scalar
    545540and powers of some variables, such as 5*X^2*Y^3."))
Note: See TracChangeset for help on using the changeset viewer.