22 using std::cout;
using std::endl;
24 #include "algorithm_buchberger_basic.hpp" 26 #include "monomial.hpp" 27 #include "polynomial.hpp" 29 int main(
int argc,
char *argv[]) {
36 unsigned e1 [] {1,0,0,0};
Monomial t1(4, e1);
37 unsigned e2 [] {0,1,0,0};
Monomial t2(4, e2);
38 unsigned e3 [] {0,0,1,0};
Monomial t3(4, e3);
39 unsigned e4 [] {0,0,0,1};
Monomial t4(4, e4);
44 unsigned e5 [] {1,1,0,0};
Monomial t5(4, e5);
45 unsigned e6 [] {0,1,1,0};
Monomial t6(4, e6);
46 unsigned e7 [] {0,0,1,1};
Monomial t7(4, e7);
47 unsigned e8 [] {1,0,0,1};
Monomial t8(4, e8);
53 unsigned e9 [] {1,1,1,0};
Monomial t9 (4, e9);
54 unsigned e10 [] {0,1,1,1};
Monomial t10(4, e10);
55 unsigned e11 [] {1,0,1,1};
Monomial t11(4, e11);
56 unsigned e12 [] {1,1,0,1};
Monomial t12(4, e12);
57 Monomial M3 [] { t9, t10, t11, t12 };
62 unsigned e13 [] {1,1,1,1};
Monomial t13(4, e13);
69 cout <<
"Computing a Groebner basis for " << f1 <<
", " << f2
70 <<
", " << f3 <<
", " << f4 << endl;
72 set<Abstract_Polynomial *> F;
73 F.insert(&f1); F.insert(&f2); F.insert(&f3); F.insert(&f4);
76 for (list<Constant_Polynomial *>::iterator g = G.begin(); g != G.end(); ++g)
77 cout <<
'\t' << *(*g) << endl;
A Constant_Polynomial is a polynomial that should not change.
list< Constant_Polynomial * > buchberger(const list< Abstract_Polynomial *> &F, SPolyCreationFlags method, StrategyFlags strategy, WT_TYPE *strategy_weights)
Implementation of Buchberger’s algorithm.
Information necessary for a field modulo a prime.
Prime_Field_Element unity()
“unity” is the multiplicative identity.
Implementation of monomials.
Element of a field of prime characteristic.
Encapsulates information about a polynomial ring for easy access: ground field, number of indetermina...