Changeset 2639
- Timestamp:
- 2015-06-20T14:45:49-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/5am-monom.lisp
r2630 r2639 170 170 (is-false (funcall elim-order-2 p q)))) 171 171 172 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;173 ;;174 ;; POLY class tests175 ;;176 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;177 178 (def-fixture poly-context ()179 (let ((p (make-instance 'poly))180 (q (make-instance 'poly :order #'grlex>)))181 (dolist (x '( (2 . 22) (4 . 44) (5 . 55) ))182 (insert-item p (make-instance 'term :exponents (list (car x)) :coeff (cdr x))))183 (dolist (x '( (0 . 11) (3 . 33) (4 . -44) (7 . 77) ))184 (insert-item q (make-instance 'term :exponents (list (car x)) :coeff (cdr x))))185 (&body)))186 187 188 (test poly-add189 "Polynomial addition"190 (with-fixture poly-context ()191 (print p)(print q)192 (print (add-to p q))193 (print p)(print q)194 ))195 196 (test poly-subtract197 "Polynomial subtraction"198 (with-fixture poly-context ()199 (print p)(print q)200 (print (subtract-from p q))201 (print p)(print q)202 ))203 204 172 (run! 'monom-suite) 205 173 (format t "All tests done!~%")
Note:
See TracChangeset
for help on using the changeset viewer.