Skip to main content

union_positions

Function union_positions 

Source
pub fn union_positions<'a>(
    axes: impl IntoIterator<Item = &'a TimeAxis>,
) -> UnionPositions<'a> ⓘ
Expand description

Walks every position at least one of axes carries, once, in increasing order.

A merge over one cursor per axis: each step costs one comparison per axis, and no position is visited twice. This is how an operator covering several axes (a histogram’s bucket series, an aggregate over an input set) visits the positions that hold something, instead of scanning the envelope from the earliest to the latest position and densifying every hole in between.

Every axis must be addressed on the same GridSpec: a position names a point of one shared EvalGrid, so merging axes of two different grids would interleave unrelated positions. An explicit axis carries no grid and must not be passed at all – its rows are not absolute positions on any shared grid. Debug builds assert the precondition and therefore panic on a violation; release builds trust the caller.