Changeset 3271
- Timestamp:
- 2015-06-22T21:22:50-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/5am-symbolic-poly.lisp
r3267 r3271 57 57 (in-suite symbolic-poly-suite) 58 58 59 (def-fixture sym-poly-context () 60 (let ((p (make-instance 'poly)) 61 (p-symbolic (make-instance 'symbolic-poly :vars '(x)))) 62 (dolist (x '( ((2) . 22) ((4) . 44) ((5) . 55) ((8) . 88) ((9) . 99) )) 63 (insert-item p (make-instance 'term :exponents (car x) :coeff (cdr x))) 64 (insert-item p-symbolic (make-instance 'term :exponents (car x) :coeff (cdr x)))) 65 (&body))) 66 59 67 (test sym-poly 60 (let ((p (make-instance 'poly)) 61 (q (make-instance 'poly :order nil)) 62 (p+q (make-instance 'poly)) 63 (p-q (make-instance 'poly)) 64 (p-uminus (make-instance 'poly))) 65 ;; Populate the polynomials; the lists of (exponents . coefficient) pairs 66 ;; must be in increasing order in Q, but Q is unordered (:ORDER NIL) 67 ;; so it will be automatically sorted. 68 (dolist (x '( ((2) . 22) ((4) . 44) ((5) . 55) ((8) . 88) ((9) . 99) )) 69 (insert-item p (make-instance 'term :exponents (car x) :coeff (cdr x)))) 68 "Symbolic polynomial" 69 (with-fixture sym-poly-context () 70 (is-true (r-equalp (change-class p 'symbolic-poly :vars '(x)) p-symbolic )))) 70 71 71 72
Note:
See TracChangeset
for help on using the changeset viewer.