|
Macaulay2 Engine
|
Indexed table of monomials with fast "find a divisor" lookup, keyed by a free integer val per entry. More...
#include <montable.hpp>
Classes | |
| struct | mon_term |
| Doubly-linked-list node of a MonomialTable's per-component monomial list. More... | |
Public Member Functions | |
| ~MonomialTable () | |
| void | insert (exponents_t exp, int comp, int id) |
| int | find_divisor (exponents_t exp, int comp) |
| int | find_divisors (int max, exponents_t exp, int comp, VECTOR(mon_term *) *result=nullptr) |
| mon_term * | find_exact (exponents_t exp, int comp) const |
| void | show (FILE *fil) |
Static Public Member Functions | |
| static MonomialTable * | make (int nvars) |
| Static Public Member Functions inherited from our_new_delete | |
| static void * | operator new (size_t size) |
| static void * | operator new[] (size_t size) |
| static void | operator delete (void *obj) |
| static void | operator delete[] (void *obj) |
| static void * | operator new (size_t size, void *existing_memory) |
| static void * | operator new[] (size_t size, void *existing_memory) |
| static void | operator delete (void *obj, void *existing_memory) |
| static void | operator delete[] (void *obj, void *existing_memory) |
Private Member Functions | |
| MonomialTable () | |
| VECTOR (mon_term *) _head | |
| mon_term * | make_list_head () |
Static Private Member Functions | |
| static MonomialTable * | make_minimal (int nvars, const VECTOR(exponents_t) &exps, const VECTOR(int) &comps, const VECTOR(int) &vals, VECTOR(int) &rejects) |
| static void | minimalize (int nvars, const VECTOR(exponents_t) &exps, const VECTOR(int) &comps, bool keep_duplicates, VECTOR(int) &result_positions) |
| static void | move_up (mon_term *const y, mon_term *const head) |
| static void | insert_before (mon_term *const y, mon_term *const z) |
| static void | remove (mon_term *const y) |
Private Attributes | |
| stash * | mon_term_stash |
| int | _nvars |
| int | _count |
| mon_term * | _last_match |
| int | _last_match_comp |
Indexed table of monomials with fast "find a divisor" lookup, keyed by a free integer val per entry.
Stores entries as a per-component doubly-linked list of mon_terms sorted in increasing lex order. Each entry caches a _mask (popcount-style divisibility filter) so divisor searches can skip most monomials with a single bitwise test. Pure (exponents, component) -> val index — the exponent vectors themselves are owned by the caller (the table does not free them). MonomialTableZZ is the companion specialisation when entries also carry a ZZ coefficient and the GB needs to track leading-term divisibility modulo content.
Definition at line 80 of file montable.hpp.