Changeset 3463 for branches/f4grobner
- Timestamp:
- 2015-09-05T09:49:40-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/5am-monom.lisp
r3462 r3463 71 71 "Monom basics" 72 72 (with-fixture monom-context () 73 (is (= ( r-dimension m) 3))74 (is (= ( r-elt m 2) 3))75 (is (= ( r-total-degree m) 6))76 (is (= ( r-sugar m) 6))77 (is (equalp ( r->list (make-instance 'monom :dimension 3)) '(0 0 0)) "Trivial monomial is a vector of 0's")78 (is ( r-equalp (r* m n) m*n))79 (is ( r-equalp (r/ n m) n/m))80 (is ( r-equalp (right-tensor-product-by m n) m-tensor-n))73 (is (= (monom-dimension m) 3)) 74 (is (= (monom-elt m 2) 3)) 75 (is (= (monom-total-degree m) 6)) 76 (is (= (monom-sugar m) 6)) 77 (is (equalp (monom->list (make-instance 'monom :dimension 3)) '(0 0 0)) "Trivial monomial is a vector of 0's") 78 (is (monom-equalp (r* m n) m*n)) 79 (is (monom-equalp (r/ n m) n/m)) 80 (is (monom-equalp (right-tensor-product-by m n) m-tensor-n)) 81 81 (signals 82 82 (error "EXPONENTS must have length DIMENSION") 83 83 (make-instance 'monom :dimension 3 :exponents '(1 2 3 4 5 6))) 84 (is-true ( r-divides-p m n))85 (is-false ( r-divides-p n m))86 (is ( r-equalp (r-gcd m n) m))87 (is ( r-equalp (r-lcm m n) n))88 (is-true ( r-depends-p m 0))84 (is-true (monom-divides-p m n)) 85 (is-false (monom-divides-p n m)) 86 (is (monom-equalp (monom-gcd m n) m)) 87 (is (monom-equalp (monom-lcm m n) n)) 88 (is-true (monom-depends-p m 0)) 89 89 (signals 90 90 (error "Index out of bounds") 91 ( r-depends-p m 3))91 (monom-depends-p m 3)) 92 92 ) 93 93 (with-fixture monom-context () 94 (is ( r-equalp (multiply-by m n) m*n)))94 (is (monom-equalp (multiply-by m n) m*n))) 95 95 (with-fixture monom-context () 96 (is ( r-equalp (divide-by n m) n/m))))96 (is (monom-equalp (divide-by n m) n/m)))) 97 97 98 98 (run! 'monom-suite)
Note:
See TracChangeset
for help on using the changeset viewer.