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;
50 eltType::setModulo(65521);
56 string * vars =
new string[6];
57 for(
int i = 0; i < 6; i++)
59 vars[i]=
'x'+to_string(i);
64 vector<Polynomial<eltType>> polynomialArray;
67 polynomialArray.emplace_back(
"x0+x1+x2+x3+x4+x5");
68 polynomialArray.emplace_back(
"x0*x1+x1*x2+x2*x3+x3*x4+x0*x5+x4*x5");
69 polynomialArray.emplace_back(
"x0*x1*x2+x1*x2*x3+x2*x3*x4+x0*x1*x5+x0*x4*x5+x3*x4*x5");
70 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");
71 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");
72 polynomialArray.emplace_back(
"x0*x1*x2*x3*x4*x5-1");
78 int nbGen=cyclic6.f4();
79 cout <<
"The groebner basis has " << nbGen <<
" generators " << endl << endl;
82 vector<string> basis = cyclic6.getReducedGroebnerBasis();
85 for(
size_t i = 0; i < basis.size(); i++)
87 cout << basis[i] << endl;
Declaration of class F4 methods.
static void initMonomial(int nbVariable, short degree=1)
Initialise the static parameters of Monomial.
Represent an element of a prime field, this class is a POD (Plain Old Data) because of the alignement...
static void setVariable(std::string const *vars)
Modify the static variable VARS.