Macaulay2 Engine
Loading...
Searching...
No Matches
monideal.hpp File Reference

MonomialIdeal — exponent-vector-only representation of an ideal generated by monomials. More...

#include "ExponentVector.hpp"
#include "ExponentList.hpp"
#include "int-bag.hpp"
#include "ring.hpp"
#include "polyring.hpp"
#include "mem.hpp"

Go to the source code of this file.

Classes

class  Nmi_node
 Internal tree node of the MonomialIdeal decision tree. More...
class  MonomialIdeal
 Engine-side monomial ideal: a decision tree of Nmi_nodes storing the (typically minimal) generators by variable / exponent path. More...
class  MonomialIdeal::Iterator
 Bidirectional forward iterator over the Bags stored in a MonomialIdeal. More...
struct  monideal_pair

Detailed Description

MonomialIdeal — exponent-vector-only representation of an ideal generated by monomials.

Note
AI-generated documentation. Verify against the source before relying on it.

Declares MonomialIdeal, the specialised type the engine uses for ideals whose generators are pure monomials. Generators are not held as a flat list but as a tree of Nmi_nodes indexed by (var, exp): each internal node branches on a variable and exponent, each leaf carries a Bag* whose monom() returns the generator as a gc_vector<int> in varpower form. The trie shape supports fast divisibility / containment lookups by walking the tree variable-by-variable rather than scanning a list of monomials. The combinatorial structure lets every operation skip coefficient arithmetic and monomial-ordering work entirely: intersection, sum, quotient, saturation, radical, Borel closure, and monomial primary decomposition all reduce to tree walks.

The class is EngineObject-backed and intentionally immutable once interned (its hash is computed lazily). The #if 0 block at the top of the header sketches a SparseMonomial view interface that has not been implemented — ignore it when reading the active code. The same monomial shape is what hilb.hpp's Hilbert-series recursion consumes, and the initial-ideal output of a Groebner basis lives here.

See also
ExponentList.hpp
assprime.hpp
hilb.hpp

Definition in file monideal.hpp.