|
Macaulay2 Engine
|
PolynomialHeap abstract interface — batched-subtraction heap for non-commutative reduction. More...
#include "Polynomial.hpp"#include "ringelem.hpp"#include <iosfwd>#include <memory>#include <utility>Go to the source code of this file.
Classes | |
| class | PolynomialHeap |
| Abstract interface for accumulating a polynomial as a sum of (coeff, left * poly * right) contributions in the free algebra. More... | |
Enumerations | |
| enum class | HeapType { Trivial , Map , PriorityQueue , NaiveGeobucket , NaiveHeap , NaiveTourTree , NaiveDedupGeobucket } |
Functions | |
| HeapType | getHeapType (int strategy) |
| std::string | getHeapName (HeapType type) |
| std::unique_ptr< PolynomialHeap > | makePolynomialHeap (HeapType type, const FreeAlgebra &F) |
PolynomialHeap abstract interface — batched-subtraction heap for non-commutative reduction.
Declares the pure-virtual surface every NCGroebner / NCF4 reduction uses to combine many tail-polynomial subtractions into a single O(n log k) pipeline rather than a quadratic term-by-term merge. addPolynomial(poly) and addPolynomial(coeff, left, right, poly) queue a polynomial (or its left-coeff-right scaling) for subtraction; viewLeadTerm / removeLeadTerm give the running result's current leading term and pop it; value() materialises the accumulated polynomial when reduction is complete. The HeapType enum selects between concrete implementations (Trivial, Map, PriorityQueue, the various geobucket / tournament-tree / dedup variants) which makePolynomialHeap instantiates — kept side-by-side for benchmarking against each other.
Non-commutative analogue of the commutative engine's gbvectorHeap. getHeapType(strategy) maps the user-facing Strategy => integer onto a concrete HeapType, and getName() on a live heap reports which one is active so profile output is unambiguous.
Definition in file NCReduction.hpp.