Changeset 2144
- Timestamp:
- 2015-06-17T21:29:08-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/monom.lisp
r2143 r2144 115 115 (setf (cl:elt exponents index) new-value))) 116 116 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))) 118 118 "Return the todal degree of a monomoal M. Optinally, a range 119 119 of variables may be specified with arguments START and END." … … 124 124 125 125 126 (defmethod sugar ((m monom) &aux (start 0) (end (dimension m)))126 (defmethod r-sugar ((m monom) &aux (start 0) (end (dimension m))) 127 127 "Return the sugar of a monomial M. Optinally, a range 128 128 of variables may be specified with arguments START and END." … … 132 132 (total-degree exponents start end))) 133 133 134 (defmethod +((m1 monom) (m2 monom))134 (defmethod r* ((m1 monom) (m2 monom)) 135 135 "Multiply monomial M1 by monomial M2." 136 136 (with-slots ((exponents1 exponents)) … … 145 145 146 146 147 (defmethod / ((m1 monom) (m2 monom))147 (defmethod r/ ((m1 monom) (m2 monom)) 148 148 "Divide monomial M1 by monomial M2." 149 149 (with-slots ((exponents1 exponents)) … … 156 156 (make-instance 'monom :dim dim :exponents exponents))))) 157 157 158 (defmethod divides-p ((m1 monom) (m2 monom))158 (defmethod r-divides-p ((m1 monom) (m2 monom)) 159 159 "Returns T if monomial M1 divides monomial M2, NIL otherwise." 160 160 (with-slots ((exponents1 exponents)) … … 165 165 166 166 167 (defmethod divides-lcm-p ((m1 monom) (m2 monom) (m3 monom))167 (defmethod r-divides-lcm-p ((m1 monom) (m2 monom) (m3 monom)) 168 168 "Returns T if monomial M1 divides LCM(M2,M3), NIL otherwise." 169 169 (every #'(lambda (x y z) (<= x (max y z))) … … 171 171 172 172 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)) 174 174 "Returns T if monomial MONOM-LCM(M1,M2) divides MONOM-LCM(M3,M4), NIL otherwise." 175 175 (declare (type monom m1 m2 m3 m4)) … … 177 177 m1 m2 m3 m4)) 178 178 179 (defmethod lcm-equal-lcm-p (m1 m2 m3 m4)179 (defmethod r-lcm-equal-lcm-p (m1 m2 m3 m4) 180 180 "Returns T if monomial LCM(M1,M2) equals LCM(M3,M4), NIL otherwise." 181 181 (with-slots (exponents1 exponents) … … 191 191 exponents1 exponents2 exponents3 exponents4)))))) 192 192 193 (defmethod divisible-by-p ((m1 monom) (m2 monom))193 (defmethod r-divisible-by-p ((m1 monom) (m2 monom)) 194 194 "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)))) 197 200 198 201 (defmethod rel-prime-p ((m1 monom) (m2 monom))
Note:
See TracChangeset
for help on using the changeset viewer.