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


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

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/monom.lisp

    r3562 r3563  
    253253           exponents1 exponents2 exponents3 exponents4))))))
    254254
    255 (defmethod monom-divisible-by-p ((m1 monom) (m2 monom))
    256   "Returns T if monomial M1 is divisible by monomial M2, NIL otherwise."
    257   (with-slots ((exponents1 exponents))
    258       m1
    259     (with-slots ((exponents2 exponents))
    260         m2
    261       (every #'>= exponents1 exponents2))))
    262 
    263 (defmethod monom-rel-prime-p ((m1 monom) (m2 monom))
    264   "Returns T if two monomials M1 and M2 are relatively prime (disjoint)."
    265   (with-slots ((exponents1 exponents))
    266       m1
    267     (with-slots ((exponents2 exponents))
    268         m2
    269       (every #'(lambda (x y) (zerop (min x y))) exponents1 exponents2))))
     255(defgeneric divisible-by-p (object1 object2)
     256  (:documentation "Return T if OBJECT1 is divisible by OBJECT2.")
     257  (:method ((m1 monom) (m2 monom))
     258    "Returns T if monomial M1 is divisible by monomial M2, NIL otherwise."
     259    (with-slots ((exponents1 exponents))
     260        m1
     261      (with-slots ((exponents2 exponents))
     262          m2
     263        (every #'>= exponents1 exponents2)))))
     264
     265(defmethod rel-prime-p (object1 object2)
     266  (:method ((m1 monom) (m2 monom))
     267    "Returns T if two monomials M1 and M2 are relatively prime (disjoint)."
     268    (with-slots ((exponents1 exponents))
     269        m1
     270      (with-slots ((exponents2 exponents))
     271          m2
     272        (every #'(lambda (x y) (zerop (min x y))) exponents1 exponents2)))))
    270273
    271274(defmethod monom-lcm ((m1 monom) (m2 monom))
Note: See TracChangeset for help on using the changeset viewer.