Trait splr::types::EmaIF[][src]

pub trait EmaIF {
    type Input;
    fn get(&self) -> f64;
fn update(&mut self, x: Self::Input); fn reset(&mut self) { ... }
fn trend(&self) -> f64 { ... } }
Expand description

API for Exponential Moving Average, EMA, like get, reset, update and so on.

Associated Types

the type of the argument of update.

Required methods

return the current value.

catch up with the current state.

Provided methods

reset internal data.

return a ratio of short / long statistics.

Implementors