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 3463


Ignore:
Timestamp:
2015-09-05T09:49:40-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/5am-monom.lisp

    r3462 r3463  
    7171  "Monom basics"
    7272  (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))
    8181    (signals
    8282        (error "EXPONENTS must have length DIMENSION")
    8383      (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))
    8989    (signals
    9090        (error "Index out of bounds")
    91       (r-depends-p m 3))
     91      (monom-depends-p m 3))
    9292    )
    9393  (with-fixture monom-context ()
    94     (is (r-equalp (multiply-by m n) m*n)))
     94    (is (monom-equalp (multiply-by m n) m*n)))
    9595  (with-fixture monom-context ()
    96     (is (r-equalp (divide-by n m) n/m))))
     96    (is (monom-equalp (divide-by n m) n/m))))
    9797 
    9898(run! 'monom-suite)
Note: See TracChangeset for help on using the changeset viewer.