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


Ignore:
Timestamp:
2016-06-04T20:19:32-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/monom.lisp

    r4245 r4253  
    314314
    315315
    316 (defgeneric universal-gcd (object1 object2)
    317   (:documentation "Returns GCD of objects OBJECT1 and OBJECT2")
    318   (:method ((m1 monom) (m2 monom))
    319     "Returns greatest common divisor of monomials M1 and M2."
    320     (with-slots ((exponents1 exponents))
    321         m1
    322       (with-slots ((exponents2 exponents))
    323           m2
    324         (let* ((exponents (copy-seq exponents1)))
    325           (map-into exponents #'min exponents1 exponents2)
    326           (make-instance 'monom :exponents exponents))))))
     316(defmethod universal-gcd ((m1 monom) (m2 monom))
     317  "Returns greatest common divisor of monomials M1 and M2."
     318  (with-slots ((exponents1 exponents))
     319      m1
     320    (with-slots ((exponents2 exponents))
     321        m2
     322      (let* ((exponents (copy-seq exponents1)))
     323        (map-into exponents #'min exponents1 exponents2)
     324        (make-instance 'monom :exponents exponents)))))
    327325
    328326(defgeneric depends-p (object k)
Note: See TracChangeset for help on using the changeset viewer.