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


Ignore:
Timestamp:
2015-09-05T16:49:08-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/monom.lisp

    r3565 r3566  
    273273        (every #'(lambda (x y) (zerop (min x y))) exponents1 exponents2)))))
    274274
    275 (defmethod monom-lcm ((m1 monom) (m2 monom))
    276   "Returns least common multiple of monomials M1 and M2."
    277   (with-slots ((exponents1 exponents))
    278       m1
    279     (with-slots ((exponents2 exponents))
    280         m2
    281       (let* ((exponents (copy-seq exponents1)))
    282         (map-into exponents #'max exponents1 exponents2)
    283         (make-instance 'monom :exponents exponents)))))
     275(defgeneric monom-lcm (object1 object2)
     276  (:documentation "Returns the multiple of objects OBJECT1 and OBJECT2.")
     277  (:method ((m1 monom) (m2 monom))
     278    "Returns least common multiple of monomials M1 and M2."
     279    (with-slots ((exponents1 exponents))
     280        m1
     281      (with-slots ((exponents2 exponents))
     282          m2
     283        (let* ((exponents (copy-seq exponents1)))
     284          (map-into exponents #'max exponents1 exponents2)
     285          (make-instance 'monom :exponents exponents))))))
    284286
    285287
Note: See TracChangeset for help on using the changeset viewer.