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 4201 for branches/f4grobner


Ignore:
Timestamp:
2016-06-04T09:52:57-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

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

    r4198 r4201  
    5454
    5555(defpackage #:5am-buchberger
    56   (:use :cl :it.bese.fiveam :monom :polynomial :infix :symbolic-polynomial :division :priority-queue :buchberger))
     56  (:use :cl :it.bese.fiveam :monom :polynomial :infix :symbolic-polynomial :division :priority-queue :buchberger :grobner-debug))
    5757
    5858(in-package :5am-buchberger)
     
    6363(in-suite buchberger-suite)
    6464
     65#+nil
     66(setf $poly_grobner_debug t
     67      $poly_top_reduction_only nil)
     68
     69(def-fixture buchberger-context ()
     70  (let ((fl (cdr (string->poly "[x+y,x-2*y]" '(x y))))
     71        (gb (cdr (string->poly "[x+y,x-2*y,y]" '(x y)))))
     72    (&body)))
     73
    6574
    6675(test buchberger
    6776  "Buchberger algorithm"
    68   (let* ((fl (cdr (string->poly "[x+y,x-2*y]" '(x y))))
    69          (gb (cdr (string->poly "[x+y,x-2*y,y]" '(x y)))))
     77  (with-fixture buchberger-context ()
    7078    (is-true (grobner-test gb fl))
    7179    (is (every #'universal-equalp (buchberger fl) gb))
     
    7583
    7684;; poly_grobner([x-3*u-3*u*v^2+u^3,y-3*v-3*u^2*v+v^3,z-3*u^2+3*v^2],[u,v,x,y,z]);
    77 (test buchberger-advanced
    78   "Buchberger algorithm - advanced case"
     85(def-fixture buchberger-advanced-context ()
    7986  (let ((fl (cdr (string->poly "[x-3*u-3*u*v^2+u^3,y-3*v-3*u^2*v+v^3,z-3*u^2+3*v^2]" '(u v x y z))))
    8087        (gb (cdr (string->poly "[x-3*u*v^2+u^3-3*u,y+v^3-3*u^2*v-3*v,z+3*v^2-3*u^2,
     
    108115             +118098*y^4*z^2-118098*x^4*z^2+59049*y^4*z-118098*x^2*y^2*z
    109116             +59049*x^4*z+19683*y^6-59049*x^2*y^4+59049*x^4*y^2-19683*x^6]" '(u v x y z)))))
     117    (&body)))
     118   
     119(test buchberger-advanced
     120  "Buchberger algorithm - advanced case"
     121  (with-fixture buchberger-advanced-context ()
    110122    (is-true (grobner-test gb fl))
    111123    ;;(is (every #'universal-equalp (buchberger fl) gb))
    112124    ;;(is (every #'universal-equalp (parallel-buchberger fl) gb))
    113125    ))
    114    
     126
    115127
    116128
Note: See TracChangeset for help on using the changeset viewer.