Changeset 2171
- Timestamp:
- 2015-06-17T22:13:13-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/monom.lisp
r2170 r2171 175 175 (defmethod r-lcm-equal-lcm-p (m1 m2 m3 m4) 176 176 "Returns T if monomial LCM(M1,M2) equals LCM(M3,M4), NIL otherwise." 177 (with-slots ( exponents1 exponents)178 m1 179 (with-slots ( exponents2 exponents)180 m2 181 (with-slots ( exponents3 exponents)177 (with-slots ((exponents1 exponents)) 178 m1 179 (with-slots ((exponents2 exponents)) 180 m2 181 (with-slots ((exponents3 exponents)) 182 182 m3 183 (with-slots ( exponents4 exponents)183 (with-slots ((exponents4 exponents)) 184 184 m4 185 185 (every … … 189 189 (defmethod r-divisible-by-p ((m1 monom) (m2 monom)) 190 190 "Returns T if monomial M1 is divisible by monomial M2, NIL otherwise." 191 (with-slots ( exponents1 exponents)192 m1 193 (with-slots ( exponents2 exponents)191 (with-slots ((exponents1 exponents)) 192 m1 193 (with-slots ((exponents2 exponents)) 194 194 m2 195 195 (every #'>= exponents1 exponents2)))) … … 197 197 (defmethod r-rel-prime-p ((m1 monom) (m2 monom)) 198 198 "Returns T if two monomials M1 and M2 are relatively prime (disjoint)." 199 (with-slots ( exponents1 exponents)200 m1 201 (with-slots ( exponents2 exponents)199 (with-slots ((exponents1 exponents)) 200 m1 201 (with-slots ((exponents2 exponents)) 202 202 m2 203 203 (every #'(lambda (x y) (zerop (min x y))) exponents1 exponents2)))) … … 206 206 (defmethod r-equalp ((m1 monom) (m2 monom)) 207 207 "Returns T if two monomials M1 and M2 are equal." 208 (with-slots ( exponents1 exponents)209 m1 210 (with-slots ( exponents2 exponents)208 (with-slots ((exponents1 exponents)) 209 m1 210 (with-slots ((exponents2 exponents)) 211 211 m2 212 212 (every #'= exponents1 exponents2)))) … … 214 214 (defmethod r-lcm ((m1 monom) (m2 monom)) 215 215 "Returns least common multiple of monomials M1 and M2." 216 (with-slots ( exponents1 exponents)217 m1 218 (with-slots ( exponents2 exponents)216 (with-slots ((exponents1 exponents)) 217 m1 218 (with-slots ((exponents2 exponents)) 219 219 m2 220 220 (let* ((exponents (copy-seq exponents1)) … … 226 226 (defmethod r-gcd ((m1 monom) (m2 monom)) 227 227 "Returns greatest common divisor of monomials M1 and M2." 228 (with-slots ( exponents1 exponents)229 m1 230 (with-slots ( exponents2 exponents)228 (with-slots ((exponents1 exponents)) 229 m1 230 (with-slots ((exponents2 exponents)) 231 231 m2 232 232 (let* ((exponents (copy-seq exponents1)) … … 245 245 &aux (dim (+ (r-dimension m1) (r-dimension m2)))) 246 246 (declare (fixnum dim)) 247 (with-slots ( exponents1 exponents)248 m1 249 (with-slots ( exponents2 exponents)247 (with-slots ((exponents1 exponents)) 248 m1 249 (with-slots ((exponents2 exponents)) 250 250 m2 251 251 (make-instance 'monom
Note:
See TracChangeset
for help on using the changeset viewer.