![]() |
OPENF4
Library for Gröebner basis computations over finite fields.
|
Represent a monomial. More...
#include <monomial.h>
Public Member Functions | |
| Monomial () | |
| Constructor. Beware, varlist is not allocated. | |
| Monomial (Monomial const &toCopy) | |
| Copy constructor. | |
| short | getDegree () const |
| Get the degree of this. More... | |
| uint8_t const * | getVarlist () const |
| Get the varlist of this. More... | |
| uint8_t | getVarlist (int index) const |
| Get varlist[index]. More... | |
| void | setVarlist (uint8_t *varlist) |
| Set the varlist of this. | |
| void | allocate () |
| Allocate the varlist of this. | |
| void | erase () |
| Delete the varlist of this. | |
| void | setMonomial (uint8_t const *varlist) |
| Initialize this with varlist. More... | |
| void | setMonomial (std::string const s) |
| Initialize this with s. More... | |
| void | setMonomial (int numMon) |
| Initialize this with the numMon th monomial. More... | |
| void | setMonomial (Monomial const &mon) |
| Initialize this with mon. More... | |
| void | setMonomialMultiply (Monomial const &mon1, Monomial const &mon2) |
| Initialize this with mon1 * mon2. More... | |
| void | setMonomialDivide (Monomial const &mon1, Monomial const &mon2) |
| Initialize this with mon1 / mon2. More... | |
| void | intToMonomial (int numMon) |
| Initialize this with the num-th monomial. More... | |
| int | monomialToInt () const |
| Compute the number of this. More... | |
| void | printMonomial (std::ostream &stream) const |
| Print the monomial. More... | |
| int | compareMonomial (Monomial const &mon) const |
| Compare monomials according to the grevlex order. More... | |
| bool | isDivisible (Monomial const &mon) const |
| Test if this is divisible by mon. More... | |
| void | reset () |
| Reset this. More... | |
| Monomial & | operator= (Monomial const &mon) |
| Overload the operator =. More... | |
| Monomial & | operator= (Monomial &&mon) |
| Overload the operator = (move assignment). Used when mon is unnamed (only copy the pointer). More... | |
| Monomial & | operator*= (Monomial const &mon) |
| Overload the operator *=. More... | |
| Monomial & | operator/= (Monomial const &mon) |
| Overload the operator /=. More... | |
Static Public Member Functions | |
| static void | setNbVariable (int nbVariable) |
| Modify the static variable NB_VARIABLE. More... | |
| static int | getNbVariable () |
| Get the static variable NB_VARIABLE. More... | |
| static void | setVariable (std::string const *vars) |
| Modify the static variable VARS. More... | |
| static std::string const * | getVariable () |
| Get the static variable VARS. More... | |
| static void | setWeight (int *weight) |
| Modify the static variable WEIGHT. More... | |
| static int * | getWeight () |
| Get the static variable WEIGHT. More... | |
| static short | getMaxDegree () |
| Get the static variable MAX_DEGREE. More... | |
| static void | setNbMonomial (short maxDegree) |
| Modify the dynamic 2D array NB_MONOMIAL, and call setMonomialArray(). More... | |
| static void | increaseNbMonomial (int numMonomial) |
| Modify the dynamic 2D array NB_MONOMIAL. More... | |
| static int | getNbMonomial () |
| Get NB_MONOMIAL[MAX_DEGREE][NB_VARIABLE+1]. More... | |
| static int | getNbMonomial (int row, int column) |
| Get NB_MONOMIAL[row][column]. More... | |
| static void | freeNbMonomial () |
| Free the dynamic 2D array NB_MONOMIAL, and call freeMonomialArray(). More... | |
| static int | compareNumMonomial (int numMon1, int numMon2) |
| Compare two monomials, using MONOMIAL_ARRAY if possible. More... | |
| static int | varlistToInt (uint8_t const *varlist) |
| Compute the number of a monomial from its varlist. More... | |
| static int | varlistToInt (uint8_t const *varlist, short deg) |
| Compute the number of a monomial from its varlist and its degree. More... | |
| static int | varlistToInt (uint8_t const *varlist1, uint8_t const *varlist2) |
| Compute the number of a product of 2 monomials from their varlists. More... | |
| static void | initMonomial (int nbVariable, short degree=1) |
| Initialise the static parameters of Monomial. More... | |
| static void | freeMonomial () |
| Free the space allocated by initMonomial. | |
Private Attributes | |
| short | _deg |
| uint8_t * | _varlist |
Static Private Attributes | |
| static int | NB_VARIABLE |
| static std::string const * | VARS |
| static int * | WEIGHT |
| 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+1] = Number of monomials of degree <= d. | |
| static short | MAX_DEGREE |
Friends | |
| int | multiplyMonomial (Monomial const &mon1, Monomial const &mon2) |
| Multiply mon1 and mon2. More... | |
Represent a monomial.
Definition at line 46 of file monomial.h.
| int F4::Monomial::compareMonomial | ( | Monomial const & | mon | ) | const |
Compare monomials according to the grevlex order.
| mon | Monomial. |
|
static |
Compare two monomials, using MONOMIAL_ARRAY if possible.
| numMon1 | Number of the first monomial. |
| numMon2 | Number of the second monomial. |
|
static |
Free the dynamic 2D array NB_MONOMIAL, and call freeMonomialArray().
| maxDegree | Maximal degree (height) of NB_MONOMIAL. |
| short F4::Monomial::getDegree | ( | ) | const |
Get the degree of this.
|
static |
Get the static variable MAX_DEGREE.
|
static |
Get NB_MONOMIAL[MAX_DEGREE][NB_VARIABLE+1].
|
static |
Get NB_MONOMIAL[row][column].
| row | Index of the row. |
| column | Index of the column. |
|
static |
Get the static variable NB_VARIABLE.
|
static |
Get the static variable VARS.
| uint8_t const* F4::Monomial::getVarlist | ( | ) | const |
Get the varlist of this.
| uint8_t F4::Monomial::getVarlist | ( | int | index | ) | const |
Get varlist[index].
|
static |
Get the static variable WEIGHT.
|
static |
Modify the dynamic 2D array NB_MONOMIAL.
| numMonomial | NB_MONOMIAL is set such that numMonomial belongs to it. |
|
static |
Initialise the static parameters of Monomial.
| nbVariable | Number of variables of the polynomial ring. |
| degree | Initialise NB_MONOMIAL up to degree "degree". |
| void F4::Monomial::intToMonomial | ( | int | numMon | ) |
Initialize this with the num-th monomial.
| numMon | number of the constructed monomial, 0 is the smallest monomial. |
| bool F4::Monomial::isDivisible | ( | Monomial const & | mon | ) | const |
Test if this is divisible by mon.
| mon | Divisor. |
| int F4::Monomial::monomialToInt | ( | ) | const |
Compute the number of this.
Overload the operator *=.
| mon | Monomial. |
Overload the operator /=.
| mon | Monomial (divisor). |
Overload the operator =.
| mon | Monomial to copy. |
Overload the operator = (move assignment). Used when mon is unnamed (only copy the pointer).
| mon | Monomial to copy. |
| void F4::Monomial::printMonomial | ( | std::ostream & | stream | ) | const |
Print the monomial.
| void F4::Monomial::reset | ( | ) |
Reset this.
| void F4::Monomial::setMonomial | ( | uint8_t const * | varlist | ) |
Initialize this with varlist.
| varlist | Array representing the degree of each variable of the monomial. |
| void F4::Monomial::setMonomial | ( | std::string const | s | ) |
Initialize this with s.
| s | String representing the monomial. |
| void F4::Monomial::setMonomial | ( | int | numMon | ) |
Initialize this with the numMon th monomial.
| numMon | number of the constructed monomial, 0 is the smallest monomial. |
| void F4::Monomial::setMonomial | ( | Monomial const & | mon | ) |
Initialize this with mon.
| mon | Monomial. |
|
static |
Modify the dynamic 2D array NB_MONOMIAL, and call setMonomialArray().
| maxDegree | Maximal degree (height) of NB_MONOMIAL. |
|
static |
Modify the static variable NB_VARIABLE.
| nbVariable | Number of variables of the polynomial ring. |
|
static |
Modify the static variable VARS.
| vars | Array of variable names of the polynomial ring. |
|
static |
Modify the static variable WEIGHT.
| weight | Array of weights. |
|
static |
Compute the number of a monomial from its varlist.
| varlist | Array representing the degree of each variable of the monomial. |
|
static |
Compute the number of a monomial from its varlist and its degree.
| varlist | Array representing the degree of each variable of the monomial. |
| degree | Degree of the monomial. |
|
static |
Compute the number of a product of 2 monomials from their varlists.
| varlist1 | Array representing the degree of each variable of the first monomial. |
| varlist2 | Array representing the degree of each variable of the second monomial. |
|
private |
Degree of the monomial
Definition at line 360 of file monomial.h.
|
private |
Array representing the degree of each variable of the monomial
Definition at line 361 of file monomial.h.
|
staticprivate |
Maximal degree (height) of NB_MONOMIAL.
Definition at line 371 of file monomial.h.
|
staticprivate |
Number of variables of the polynomial ring.
Definition at line 363 of file monomial.h.
|
staticprivate |
Array of NB_VARIABLE string representing the variable names.
Definition at line 364 of file monomial.h.
|
staticprivate |
Array of NB_VARIABLE weights.
Definition at line 365 of file monomial.h.
1.8.6