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 4177


Ignore:
Timestamp:
2016-06-03T11:14:45-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

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

    r4176 r4177  
    8888                                   :first p1
    8989                                   :second p2))
    90          (b-done (make-hash-table))
     90         (b-done (make-hash-table))     ;TODO: make meaningful B-DONE table
    9191         (partial-basis nil))
    9292    (&body)))
     
    9797    (is-false (criterion-2 pair b-done partial-basis))))
    9898
     99(def-fixture criterion-2-success-context ()
     100  (let* ((f (string->poly "x^2+2*y" '(x y z)))
     101         (g (string->poly "y*z + z^2" '(x y z)))
     102         (h (string->poly "x^2*y*z" '(x y z)))
     103         (pair (make-instance 'critical-pair :first f :second g))
     104         (b-done (make-hash-table :test #'equal)) ;TODO: make meaningful B-DONE table
     105         (partial-basis (list h)))
     106    (setf (gethash (list f h) b-done) t
     107          (gethash (list h f) b-done) t
     108          (gethash (list h g) b-done) t
     109          (gethash (list g h) b-done) t)
     110    (maphash #'(lambda (key value)
     111                 (declare (ignore value))
     112                 (print (mapcar #'->sexp key)))
     113             b-done)
     114    (&body)))
     115
     116(test criterion-2-success
     117  "Second Buchberger criterion success"
     118  (with-fixture criterion-2-success-context ()
     119    (is-true (criterion-2 pair b-done partial-basis))))
     120
    99121
    100122(run! 'criterion-suite)
Note: See TracChangeset for help on using the changeset viewer.