pub fn ewma_inf_hists<T, I>(vals: I, alpha: T) -> (usize, Vec<T>) where
    T: Float + AddAssign + Debug,
    I: IntoIterator<Item = Option<T>>,
    I::IntoIter: TrustedLen
Expand description

Arguments

  • vals - Iterator of optional values
  • alpha - Smoothing factor

Returns the a tuple with:

  • leading_null_count - the amount of nulls that must be set by the caller
  • smoothed values - The result of the ewma