Changeset 4225
- Timestamp:
- 2016-06-04T15:41:22-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/monom.lisp
r4168 r4225 21 21 22 22 (defpackage "MONOM" 23 (:use :cl :utils :copy )23 (:use :cl :utils :copy :ring :integer-ring) 24 24 (:export "MONOM" 25 25 "TERM" … … 145 145 146 146 (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))150 147 (:method ((m1 monom) (m2 monom)) 151 148 "Returns T iff monomials M1 and M2 have identical EXPONENTS." … … 329 326 (defgeneric universal-gcd (object1 object2) 330 327 (:documentation "Returns GCD of objects OBJECT1 and OBJECT2") 331 (:method ((object1 number) (object2 number)) (gcd object1 object2))332 328 (:method ((m1 monom) (m2 monom)) 333 329 "Returns greatest common divisor of monomials M1 and M2." … … 540 536 541 537 (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)) 544 539 (:documentation "Implements a term, i.e. a product of a scalar 545 540 and powers of some variables, such as 5*X^2*Y^3."))
Note:
See TracChangeset
for help on using the changeset viewer.