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 2934 for branches


Ignore:
Timestamp:
2015-06-21T12:57:45-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

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

    r2933 r2934  
    9292  )
    9393
     94(def-fixture poly-multiply-context ()
     95  (let ((p (make-instance 'poly))
     96        (q (make-instance 'poly :order nil))
     97        (p*q (make-instance 'poly)))
     98    ;; Populate the polynomials; the lists of (exponents . coefficient) pairs
     99    ;; must be in increasing order in Q, but Q is unordered (:ORDER NIL)
     100    ;; so it will be automatically sorted.
     101    (dolist (x '( ((0) . 1)  ((1) . 2) ))
     102      (insert-item p (make-instance 'term :exponents (car x) :coeff (cdr x))))
     103    (dolist (x '( ((0) . 1)  ((1) . 3) ))
     104      (insert-item 1 (make-instance 'term :exponents (car x) :coeff (cdr x))))
     105    ;; P*Q
     106    (dolist (x '( ((0) . 1) ((1) . 5) ((2) . 6)))
     107      (insert-item p*q (make-instance 'term :exponents (car x) :coeff (cdr x))))
     108    (&body)))
     109
     110
    94111(run! 'poly-suite)
    95112(format t "All tests done!~%")
Note: See TracChangeset for help on using the changeset viewer.