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::setVariableName(
"t");
51 string modulo= string(
"t^63 + t^61 + t^57 + t^56 + t^54 + t^51 + t^47 + t^46 + t^45 + t^44 + t^43 + t^42 + t^39 + t^38 + t^35 + t^34 + t^32 + t^31 + t^28 + t^25 + t^24 + t^23 + t^21 + t^19 + t^18 + t^17 + t^15 + t^13 + t^10 + t^8 + t^7 + t^5 + t^2 + t + 1");
52 eltType::setModulo(modulo);
58 string * vars =
new string[6];
59 for(
int i = 0; i < 6; i++)
61 vars[i]=
'x'+to_string(i);
66 vector<Polynomial<eltType>> polynomialArray;
69 polynomialArray.emplace_back(
"(t+t^3)*x0+(t+t^3)*x1+(t+t^3)*x2+(t+t^3)*x3+(t+t^3)*x4+(t+t^3)*x5");
70 polynomialArray.emplace_back(
"(t+t^3)*x0*x1+(t+t^3)*x1*x2+(t+t^3)*x2*x3+(t+t^3)*x3*x4+(t+t^3)*x0*x5+(t+t^3)*x4*x5");
71 polynomialArray.emplace_back(
"(t+t^3)*x0*x1*x2+(t+t^3)*x1*x2*x3+(t+t^3)*x2*x3*x4+(t+t^3)*x0*x1*x5+(t+t^3)*x0*x4*x5+(t+t^3)*x3*x4*x5");
72 polynomialArray.emplace_back(
"(t+t^3)*x0*x1*x2*x3+(t+t^3)*x1*x2*x3*x4+(t+t^3)*x0*x1*x2*x5+(t+t^3)*x0*x1*x4*x5+(t+t^3)*x0*x3*x4*x5+(t+t^3)*x2*x3*x4*x5");
73 polynomialArray.emplace_back(
"(t+t^3)*x0*x1*x2*x3*x4+(t+t^3)*x0*x1*x2*x3*x5+(t+t^3)*x0*x1*x2*x4*x5+(t+t^3)*x0*x1*x3*x4*x5+(t+t^3)*x0*x2*x3*x4*x5+(t+t^3)*x1*x2*x3*x4*x5");
74 polynomialArray.emplace_back(
"(t+t^3)*x0*x1*x2*x3*x4*x5-1");
80 int nbGen=cyclic6.f4();
81 cout <<
"The groebner basis has " << nbGen <<
" generators " << endl << endl;
84 vector<string> basis = cyclic6.getReducedGroebnerBasis();
87 for(
size_t i = 0; i < basis.size(); i++)
89 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 an extension of GF2, this class is a POD (Plain Old Data) because of the alig...
static void setVariable(std::string const *vars)
Modify the static variable VARS.