Skip to main content

mask_has_at_least_runs

Function mask_has_at_least_runs 

Source
pub(super) fn mask_has_at_least_runs(
    mask: &BooleanBuffer,
    min_runs: usize,
) -> bool
Expand description

Returns whether mask contains at least min_runs alternating set/unset runs.

Stops as soon as the requested number of runs is found, avoiding a full scan when callers only need to know whether a boundary has been crossed.