EwmaFilter

Trait EwmaFilter 

Source
pub trait EwmaFilter<T> {
    // Required methods
    fn push_sample(&mut self, new_value: T) -> T;
    fn ewma_average(&self) -> T;
    fn local_range(&self) -> Range<T>;
}

Required Methods§

Source

fn push_sample(&mut self, new_value: T) -> T

Push the next sample in the series into the filter. Returns exponentially weighted moving average

Source

fn ewma_average(&self) -> T

Returns cached exponentially weighted moving average

Source

fn local_range(&self) -> Range<T>

returns the local minima and maxima

Implementors§