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 3624 for branches/f4grobner


Ignore:
Timestamp:
2015-09-05T20:18:12-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/polynomial.lisp

    r3623 r3624  
    124124                         :termlist (list (cons old 1))))
    125125 
    126 (defgeneric poly-equalp (self other)
    127   (:documentation "Implements equality of polynomials.")
    128   (:method ((self poly) (other poly))
    129     (and (eql (poly-dimension self) (poly-dimension other))
    130          (every #'r-equalp (poly-termlist self) (poly-termlist other))
    131          (eq (poly-term-order self) (poly-term-order other)))))
    132 
    133 ;; Leading term
    134 (defgeneric poly-leading-term (object)
     126(defmethod universal-equalp ((self poly) (other poly))
     127  "Implements equality of polynomials."
     128  (and (eql (poly-dimension self) (poly-dimension other))
     129       (every #'universal-equalp (poly-termlist self) (poly-termlist other))
     130       (eq (poly-term-order self) (poly-term-order other))))
     131
     132(defgeneric leading-term (object)
    135133  (:method ((self poly))
    136134    (car (poly-termlist self)))
Note: See TracChangeset for help on using the changeset viewer.