Macaulay2 Engine
Loading...
Searching...
No Matches
BIBasis::Monom Class Referenceabstract

Abstract base for the BIBasis boolean-coefficient monomial types — a sorted, singly linked list of variable indices. More...

#include <monom.hpp>

Inheritance diagram for BIBasis::Monom:
BIBasis::MonomDL BIBasis::MonomDRL BIBasis::MonomLex

Classes

struct  VarsListNode
 Singly linked-list node of a Monom's variable list, with a per-class slab allocator. More...

Public Types

enum  Order { Lex , DegLex , DegRevLex }
typedef short int Integer

Public Member Functions

virtual ~Monom ()
virtual Integer Degree () const
virtual void SetOne ()=0
virtual Integer operator[] (const Integer var) const =0
virtual Integer FirstMultiVar () const =0
virtual std::set< IntegerGetVariablesSet () const =0

Static Public Member Functions

static Integer GetDimIndepend ()
static void SetDimIndepend (Integer independ)

Protected Member Functions

 Monom ()
virtual void MultiplyBy (Integer var)=0
virtual VarsListNodeFind (const Integer var) const =0

Protected Attributes

VarsListNodeListHead
Integer TotalDegree

Static Protected Attributes

static Integer DimIndepend = 0

Detailed Description

Abstract base for the BIBasis boolean-coefficient monomial types — a sorted, singly linked list of variable indices.

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

Integer is a 16-bit type because BIBasis caps the number of variables (DimIndepend) at 32k. Subclasses (MonomLex, MonomDL, MonomDRL) implement the comparison for their respective monomial orders; the storage layout is shared in this base. Memory comes from a per-VarsListNode FastAllocator, so list insertion is bump-pointer cheap. TotalDegree caches the sum of exponents for fast degree lookups; in this boolean (square-free) setting that equals the list length.

Definition at line 69 of file monom.hpp.


The documentation for this class was generated from the following files: