pub fn rolling_sum_bool(
window: BooleanAVT<'_, ()>,
subwindow: usize,
) -> IntegerArray<i32>Expand description
Computes rolling sums over boolean data, counting true values within sliding windows.
Treats boolean values as integers (true=1, false=0) and applies sliding window summation to count true occurrences within each window position. Essential for constructing conditional aggregations and boolean pattern analysis.
§Parameters
window- Boolean array view with offset and length specificationssubwindow- Number of boolean values to consider in each sliding window
§Returns
Returns an IntegerArray<i32> containing:
- Count of true values within each complete window
- Zero for positions with incomplete windows
- Null mask indicating window completeness and null contamination
§Examples
ⓘ
use minarrow::BooleanArray;
use simd_kernels::kernels::window::rolling_sum_bool;
let bools = BooleanArray::from_slice(&[true, false, true, true]);
let result = rolling_sum_bool((&bools, 0, bools.len()), 2);