Skip to main content

window_mean

Function window_mean 

Source
pub fn window_mean(data: &[f64], window_size: usize) -> Vec<f64>
Expand description

Sliding-window mean with Kahan summation.

Returns a vector of length max(0, data.len() - window_size + 1). Each element is the arithmetic mean of the corresponding window.