Macaulay2 Engine
Loading...
Searching...
No Matches
FreeAlgebraHeap Class Reference

Geobucket-style accumulator for many Poly summands in the free associative algebra. More...

#include <FreeAlgebra.hpp>

Public Member Functions

 FreeAlgebraHeap (const FreeAlgebra &F)
 ~FreeAlgebraHeap ()
void add (const Poly &f)
void value (Poly &result)
const Polydebug_list (int i) const

Private Attributes

const FreeAlgebraF
Poly heap [GEOHEAP_SIZE]
int top_of_heap

Detailed Description

Geobucket-style accumulator for many Poly summands in the free associative algebra.

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

Maintains GEOHEAP_SIZE size-tiered buckets; add(f) slots f into the smallest non-empty bucket it overflows and merges upward, so an O(n) chain of additions costs amortised O(n log n) work rather than O(n^2). value() linearises the buckets into a single Poly and resets the heap. Used by mult and evaluation paths that build a polynomial as a long sum of mult_by_term_left_and_right contributions.

Definition at line 355 of file FreeAlgebra.hpp.


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