37 int F4::NB_THREAD=omp_get_num_procs();
42 int main (
int argc,
char **argv)
44 cout <<
"#########################################################" << endl;
45 cout <<
"# TUTORIAL WITH SOURCES USE #" << endl;
46 cout <<
"#########################################################" << endl << endl;
49 typedef Givaro::Modular<Givaro::Integer> Field;
50 Givaro::Integer modulo(Givaro::Integer(
"115792089237316195423570985008687907853269984665640564039457584007913129640233"));
52 typedef ElementGivaro<Field> eltType;
59 string * vars =
new string[6];
60 for(
int i = 0; i < 6; i++)
62 vars[i]=
'x'+to_string(i);
67 vector<Polynomial<eltType>> polynomialArray;
70 polynomialArray.emplace_back(
"x0+x1+x2+x3+x4+x5");
71 polynomialArray.emplace_back(
"x0*x1+x1*x2+x2*x3+x3*x4+x0*x5+x4*x5");
72 polynomialArray.emplace_back(
"x0*x1*x2+x1*x2*x3+x2*x3*x4+x0*x1*x5+x0*x4*x5+x3*x4*x5");
73 polynomialArray.emplace_back(
"x0*x1*x2*x3+x1*x2*x3*x4+x0*x1*x2*x5+x0*x1*x4*x5+x0*x3*x4*x5+x2*x3*x4*x5");
74 polynomialArray.emplace_back(
"x0*x1*x2*x3*x4+x0*x1*x2*x3*x5+x0*x1*x2*x4*x5+x0*x1*x3*x4*x5+x0*x2*x3*x4*x5+x1*x2*x3*x4*x5");
75 polynomialArray.emplace_back(
"x0*x1*x2*x3*x4*x5-1");
81 int nbGen=cyclic6.f4();
82 cout <<
"The groebner basis has " << nbGen <<
" generators " << endl << endl;
85 vector<string> basis = cyclic6.getReducedGroebnerBasis();
88 for(
size_t i = 0; i < basis.size(); i++)
90 cout << basis[i] << endl;
Declaration of class F4 methods.
static void initMonomial(int nbVariable, short degree=1)
Initialise the static parameters of Monomial.
static void setVariable(std::string const *vars)
Modify the static variable VARS.