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

MonomialTableZZ — coefficient-aware leading-monomial index for ZZ-coefficient Groebner bases. More...

#include <vector>
#include <memory>
#include <algorithm>
#include <stdio.h>
#include <stddef.h>
#include "ExponentVector.hpp"
#include "buffer.hpp"
#include "newdelete.hpp"
#include "style.hpp"

Go to the source code of this file.

Classes

class  MonomialTableZZ
 MonomialTable analogue for monomials carrying a ZZ coefficient. More...
struct  MonomialTableZZ::mon_term
 MonomialTable::mon_term plus an _coeff slot pointing at the entry's leading ZZ coefficient (or nullptr for the coefficient-blind case). More...

Detailed Description

MonomialTableZZ — coefficient-aware leading-monomial index for ZZ-coefficient Groebner bases.

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

The ZZ-coefficient counterpart of montable.hpp. Each mon_term carries a doubly-linked-list pair (_next / _prev), the borrowed exponent pointer _lead (whose bytes belong to the owning polynomial; trailing sugar coordinates are ignored), a precomputed bitmask _mask, a basis index _val, and a leading-coefficient pointer _coeff (also borrowed). The terms are kept in lex order on monomials per the in-source comment; over ZZ a basis element only reduces a target when its leading coefficient divides the target's, so the API splits divisibility queries into monomial-only and coefficient-aware variants.

Public methods: make(nvars) (the constructor), insert(coeff, exp, comp, id), is_weak_member (submodule containment) and is_strong_member (divisibility), find_smallest_coeff_divisor, find_term_divisors / find_monomial_divisors (each returning up to max matches into a VECTOR(mon_term*)), find_exact / find_exact_monomial, change_coefficient, and the static find_weak_generators / find_strong_generators minimisers. Primary consumer is the ZZ-coefficient path in gb-default.hpp, which holds two pointers of this type — the basis index lookupZZ and the quotient-ring index ringtableZZ (only one non-null at a time) — and calls the static find_weak_generators to minimise the input generators before the GB loop starts.

See also
montable.hpp
gb-default.hpp

Definition in file montableZZ.hpp.