[][src]Function flintec_lpp::mavg

pub fn mavg(
    v: &[f64],
    w: &[f64],
    max_missing_v: usize,
    max_missing_wpct: f64
) -> Vec<f64>

rolls the weighted moving window w over the data v fills the NAN values with the weighted average when possible:

  1. sufficient number of data, i.e., number missing data under the window < max_missing_v
  2. the window weight associated with the present data is sufficient, i.e., the percentage of missing weight is < than max_missing_wpct