Skip to main content

Module engine

Module engine 

Source
Expand description

Pure pivot computation: source rows in, PivotResult out.

No GPUI types and no mutation of the source data — the engine borrows the rows, buckets them into hierarchical row/column group trees, and streams every value through Accumulators at every rollup level: leaf × leaf intersections, group subtotals, axis totals, and the grand total. Aggregating once per level (instead of aggregating aggregates) keeps Avg/Count correct at every level.

Structs§

PivotNode
One group node on the row or column axis.
PivotResult
The complete computed pivot. Cheap to share behind an Arc; the paint path never touches the source rows again.

Constants§

TOTAL_KEY
Sentinel node key meaning “the total across this whole axis”. Used as a key into PivotResult::values alongside real node ids.

Functions§

compute_pivot
Compute a pivot over rows[source_rows...].