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


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

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/monom.lisp

    r2143 r2144  
    115115    (setf (cl:elt exponents index) new-value)))
    116116
    117 (defmethod total-degree ((m monom) &optional (start 0) (end (dimension m)))
     117(defmethod r-total-degree ((m monom) &optional (start 0) (end (dimension m)))
    118118  "Return the todal degree of a monomoal M. Optinally, a range
    119119of variables may be specified with arguments START and END."
     
    124124
    125125
    126 (defmethod sugar ((m monom) &aux (start 0) (end (dimension m)))
     126(defmethod r-sugar ((m monom) &aux (start 0) (end (dimension m)))
    127127  "Return the sugar of a monomial M. Optinally, a range
    128128of variables may be specified with arguments START and END."
     
    132132    (total-degree exponents start end)))
    133133
    134 (defmethod + ((m1 monom) (m2 monom))
     134(defmethod r* ((m1 monom) (m2 monom))
    135135  "Multiply monomial M1 by monomial M2."
    136136  (with-slots ((exponents1 exponents))
     
    145145
    146146
    147 (defmethod / ((m1 monom) (m2 monom))
     147(defmethod r/ ((m1 monom) (m2 monom))
    148148  "Divide monomial M1 by monomial M2."
    149149  (with-slots ((exponents1 exponents))
     
    156156        (make-instance 'monom :dim dim :exponents exponents)))))
    157157
    158 (defmethod divides-p ((m1 monom) (m2 monom))
     158(defmethod r-divides-p ((m1 monom) (m2 monom))
    159159  "Returns T if monomial M1 divides monomial M2, NIL otherwise."
    160160  (with-slots ((exponents1 exponents))
     
    165165
    166166
    167 (defmethod divides-lcm-p ((m1 monom) (m2 monom) (m3 monom))
     167(defmethod r-divides-lcm-p ((m1 monom) (m2 monom) (m3 monom))
    168168  "Returns T if monomial M1 divides LCM(M2,M3), NIL otherwise."
    169169  (every #'(lambda (x y z) (<= x (max y z)))
     
    171171
    172172
    173 (defmethod lcm-divides-lcm-p ((m1 monom) (m2 monom) (m3 monom) (m4 monom))
     173(defmethod r-lcm-divides-lcm-p ((m1 monom) (m2 monom) (m3 monom) (m4 monom))
    174174  "Returns T if monomial MONOM-LCM(M1,M2) divides MONOM-LCM(M3,M4), NIL otherwise."
    175175  (declare (type monom m1 m2 m3 m4))
     
    177177         m1 m2 m3 m4))
    178178         
    179 (defmethod lcm-equal-lcm-p (m1 m2 m3 m4)
     179(defmethod r-lcm-equal-lcm-p (m1 m2 m3 m4)
    180180  "Returns T if monomial LCM(M1,M2) equals LCM(M3,M4), NIL otherwise."
    181181  (with-slots (exponents1 exponents)
     
    191191           exponents1 exponents2 exponents3 exponents4))))))
    192192
    193 (defmethod divisible-by-p ((m1 monom) (m2 monom))
     193(defmethod r-divisible-by-p ((m1 monom) (m2 monom))
    194194  "Returns T if monomial M1 is divisible by monomial M2, NIL otherwise."
    195 
    196   (every #'>= m1 m2))
     195  (with-slots (exponents1 exponents)
     196      m1
     197    (with-slots (exponents2 exponents)
     198        m2
     199      (every #'>= exponents1 exponents2))))
    197200
    198201(defmethod rel-prime-p ((m1 monom) (m2 monom))
Note: See TracChangeset for help on using the changeset viewer.