26 #ifndef OPENF4_MONOMIAL_H
27 #define OPENF4_MONOMIAL_H
152 static int varlistToInt(uint8_t
const * varlist,
short deg);
160 static int varlistToInt(uint8_t
const * varlist1, uint8_t
const * varlist2);
167 static void initMonomial(
int nbVariable,
short degree=1);
364 static std::string
const *
VARS;
430 #include "../src/monomial.inl"
433 #endif // OPENF4_MONOMIAL_H
uint8_t const * getVarlist() const
Get the varlist of this.
short getDegree() const
Get the degree of this.
static int * getWeight()
Get the static variable WEIGHT.
bool operator<(Term< Element > const &term1, Term< Element > const &term2)
Overload the operator <.
static void freeNbMonomial()
Free the dynamic 2D array NB_MONOMIAL, and call freeMonomialArray().
void setVarlist(uint8_t *varlist)
Set the varlist of this.
Monomial & operator/=(Monomial const &mon)
Overload the operator /=.
static int getNbVariable()
Get the static variable NB_VARIABLE.
static std::vector< int * > NB_MONOMIAL
NB_MONOMIAL[d][v] = Number of degree d monomials in the v first variables. NB_MONOMIAL[d][NB_VARIABLE...
void intToMonomial(int numMon)
Initialize this with the num-th monomial.
static void setNbMonomial(short maxDegree)
Modify the dynamic 2D array NB_MONOMIAL, and call setMonomialArray().
int monomialToInt() const
Compute the number of this.
static std::string const * getVariable()
Get the static variable VARS.
void setMonomialMultiply(Monomial const &mon1, Monomial const &mon2)
Initialize this with mon1 * mon2.
Monomial()
Constructor. Beware, varlist is not allocated.
static void initMonomial(int nbVariable, short degree=1)
Initialise the static parameters of Monomial.
int compareMonomial(Monomial const &mon) const
Compare monomials according to the grevlex order.
Wrapper for config.h in order to avoid multiple definitions.
static void setWeight(int *weight)
Modify the static variable WEIGHT.
Monomial & operator=(Monomial const &mon)
Overload the operator =.
void setMonomialDivide(Monomial const &mon1, Monomial const &mon2)
Initialize this with mon1 / mon2.
void erase()
Delete the varlist of this.
static int getNbMonomial()
Get NB_MONOMIAL[MAX_DEGREE][NB_VARIABLE+1].
static void increaseNbMonomial(int numMonomial)
Modify the dynamic 2D array NB_MONOMIAL.
static int varlistToInt(uint8_t const *varlist)
Compute the number of a monomial from its varlist.
bool operator==(TaggedPolynomial< Element > const &taggedPolynomial1, TaggedPolynomial< Element > const &taggedPolynomial2)
Overload the operator ==.
Monomial & operator*=(Monomial const &mon)
Overload the operator *=.
bool isDivisible(Monomial const &mon) const
Test if this is divisible by mon.
static void setVariable(std::string const *vars)
Modify the static variable VARS.
bool operator<=(TaggedPolynomial< Element > const &taggedPolynomial1, TaggedPolynomial< Element > const &taggedPolynomial2)
Overload the operator <=.
static void freeMonomial()
Free the space allocated by initMonomial.
void allocate()
Allocate the varlist of this.
static int compareNumMonomial(int numMon1, int numMon2)
Compare two monomials, using MONOMIAL_ARRAY if possible.
friend int multiplyMonomial(Monomial const &mon1, Monomial const &mon2)
Multiply mon1 and mon2.
bool operator>=(TaggedPolynomial< Element > const &taggedPolynomial1, TaggedPolynomial< Element > const &taggedPolynomial2)
Overload the operator >=.
void setMonomial(uint8_t const *varlist)
Initialize this with varlist.
static short getMaxDegree()
Get the static variable MAX_DEGREE.
static void setNbVariable(int nbVariable)
Modify the static variable NB_VARIABLE.
void printMonomial(std::ostream &stream) const
Print the monomial.
bool operator>(Term< Element > const &term1, Term< Element > const &term2)
Overload the operator >.
static std::string const * VARS
std::ostream & operator<<(std::ostream &stream, Term< Element > const &term)
Overload the operator <<.