- Timestamp:
- 2015-09-05T18:23:34-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/5am-monom.lisp
r3484 r3593 67 67 (is (= (monom-dimension m) 3)) 68 68 (is (= (monom-elt m 2) 3)) 69 (is (= ( monom-total-degree m) 6))70 (is (= ( monom-sugar m) 6))69 (is (= (total-degree m) 6)) 70 (is (= (sugar m) 6)) 71 71 (is (equalp (monom->list (make-instance 'monom :dimension 3)) '(0 0 0)) "Trivial monomial is a vector of 0's") 72 (is ( monom-equalp (monom-multiply-2 m n) m*n))73 (is ( monom-equalp (monom-divide-by n m) n/m))74 (is ( monom-equalp (monom-right-tensor-product-by m n) m-tensor-n))72 (is (universal-equalp (multiply-2 m n) m*n)) 73 (is (universal-equalp (divide-by n m) n/m)) 74 (is (universal-equalp (right-tensor-product-by m n) m-tensor-n)) 75 75 (signals 76 76 (error "EXPONENTS must have length DIMENSION") 77 77 (make-instance 'monom :dimension 3 :exponents '(1 2 3 4 5 6))) 78 (is-true ( monom-divides-p m n))79 (is-false ( monom-divides-p n m))80 (is ( monom-equalp (monom-gcd m n) m))81 (is ( monom-equalp (monom-lcm m n) n))82 (is-true ( monom-depends-p m 0))78 (is-true (divides-p m n)) 79 (is-false (divides-p n m)) 80 (is (universal-equalp (universal-gcd m n) m)) 81 (is (universal-equalp (universal-lcm m n) n)) 82 (is-true (depends-p m 0)) 83 83 (signals 84 84 (error "Index out of bounds") 85 ( monom-depends-p m 3))85 (depends-p m 3)) 86 86 ) 87 87 (with-fixture monom-context () 88 (is ( monom-equalp (monom-multiply-by m n) m*n)))88 (is (universal-equalp (multiply-by m n) m*n))) 89 89 (with-fixture monom-context () 90 (is ( monom-equalp (monom-divide-by n m) n/m)))90 (is (universal-equalp (divide-by n m) n/m))) 91 91 (with-fixture monom-context () 92 92 (is (equal (monom->list m) '(1 2 3)))))
Note:
See TracChangeset
for help on using the changeset viewer.