[][src]Trait time_series_filter::EwmaFilter

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

Required methods

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

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

fn ewma_average(&self) -> T

Returns cached exponentially weighted moving average

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

returns the local minima and maxima

Loading content...

Implementors

impl<T> EwmaFilter<T> for FloatSeriesEwmaFilter<T> where
    T: Float + AddAssign
[src]

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

Returns exponentially weighted moving average

impl<T> EwmaFilter<T> for IntSeriesEwmaFilter<T> where
    T: PrimInt + AddAssign
[src]

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

Returns exponentially weighted moving average

Loading content...