|
Macaulay2 Engine
|
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 Poly & | debug_list (int i) const |
Private Attributes | |
| const FreeAlgebra & | F |
| Poly | heap [GEOHEAP_SIZE] |
| int | top_of_heap |
Geobucket-style accumulator for many Poly summands in the free associative algebra.
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.