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 2080


Ignore:
Timestamp:
2015-06-17T19:29:27-07:00 (10 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/monom.lisp

    r2079 r2080  
    230230      (every #'= exponents1 exponents2))))
    231231
    232 (defun monom-lcm (m1 m2 &aux (result (copy-seq m1)))
     232(defmethod lcm ((m1 monom) (m2 monom))
    233233  "Returns least common multiple of monomials M1 and M2."
    234   (declare (type monom m1 m2 result))
    235   (map-into result #'max m1 m2))
     234  (let* ((exponents (copy-seq exponents1))
     235         (dim (reduce #'+ exponents)))
     236    (map-into exponents #'max exponents1 exponents2)
     237    (make-instance 'monom :dim dim :exponents exponents)))))
     238
    236239
    237240(defun monom-gcd (m1 m2 &aux (result (copy-seq m1)))
Note: See TracChangeset for help on using the changeset viewer.