Expand description
Rolling window aggregations (sum, mean, min, max). Sliding-window functions for CJC.
Provides window_sum, window_mean, window_min, window_max over
arrays of numeric values. These are commonly used in time-series analysis,
data science pipelines, and signal processing.
§Determinism
window_sumandwindow_meanuse Kahan summation for numerically stable, deterministic results.- All window functions produce the same output for the same input on every invocation.
§Semantics
All window functions take (data: &[f64], window_size: usize) and return
a Vec<f64> of length data.len() - window_size + 1. That is, they
produce one output per valid (full) window position.
If window_size is 0 or greater than data.len(), the result is empty.
Functions§
- window_
max - Sliding-window maximum.
- window_
mean - Sliding-window mean with Kahan summation.
- window_
min - Sliding-window minimum.
- window_
sum - Sliding-window sum with Kahan summation.