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=0);
371 static std::string
const *
VARS;
437 #include "../src/monomial.inl"
440 #endif // F4_MONOMIAL_H
bool operator>=(CriticalPair< Element > const &criticalPair1, CriticalPair< Element > const &criticalPair2)
Overload the operator >=.
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.
std::ostream & operator<<(std::ostream &stream, AvlCriticalPair< Element > const &avlCriticalPair)
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.
int compareMonomial(Monomial const &mon) const
Compare monomials according to the grevlex order.
static void initMonomial(int nbVariable, short degree=0)
Initialise the static parameters of Monomial.
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 =.
bool operator<=(CriticalPair< Element > const &criticalPair1, CriticalPair< Element > const &criticalPair2)
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.
Monomial & operator*=(Monomial const &mon)
Overload the operator *=.
bool isDivisible(Monomial const &mon) const
Test if this is divisible by mon.
bool operator<(CriticalPair< Element > const &criticalPair1, CriticalPair< Element > const &criticalPair2)
Overload the operator <.
static void setVariable(std::string const *vars)
Modify the static variable VARS.
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.
bool operator>(CriticalPair< Element > const &criticalPair1, CriticalPair< Element > const &criticalPair2)
Overload the operator >.
friend int multiplyMonomial(Monomial const &mon1, Monomial const &mon2)
Multiply mon1 and mon2.
bool operator==(CriticalPair< Element > const &criticalPair1, CriticalPair< Element > const &criticalPair2)
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.
static std::string const * VARS