|
Macaulay2 Engine
|
Internal (runtime) form of a monomial ordering. More...
Go to the source code of this file.
Classes | |
| struct | mo_block |
| struct | MonomialOrder |
| Internal compiled form of a monomial ordering, derived from a front-end MonomialOrdering by monomialOrderMake. More... | |
Typedefs | |
| typedef int * | monomial |
| typedef int32_t | deg_t |
| typedef const int * | const_monomial |
Functions | |
| MonomialOrder * | monomialOrderMake (const MonomialOrdering *mo) |
| void | monomialOrderFree (MonomialOrder *mo) |
| void | monomialOrderEncodeFromActualExponents (const MonomialOrder *mo, const_exponents a, monomial b) |
| void | monomialOrderDecodeToActualExponents (const MonomialOrder *mo, const_monomial a, exponents_t b) |
| std::vector< bool > | laurentVariables (const MonomialOrder *mo) |
Internal (runtime) form of a monomial ordering.
Defines the encoded representation walked by the inner loop when two monomials are compared — the operational counterpart to the declarative MonomialOrdering the user writes. The internal form is a list of mo_blocks; each block has a type (MO_LEX, MO_GREVLEX, MO_WEIGHTS, MO_REVLEX, MO_POSITION_UP/DOWN, ...), a variable count, and block-specific data. A comparison walks the block list and returns at the first block that breaks the tie. Encoded monomials are laid out so that the common case — a leading degree or weight sum — resolves after reading a single slot, and many orderings reduce to a memcmp on the packed bytes.
Translation from the declarative MonomialOrdering to this internal form happens once, at Monoid construction; the resulting MonomialOrder* is then frozen and reused on every inner-loop compare. Degrees and weights are 32-bit signed (deg_t); intermediate-degree overflows are caught by overflow.hpp.
Definition in file imonorder.hpp.