pub trait EmaMutIF: EmaIF {
type Input;
// Required methods
fn update(&mut self, x: Self::Input);
fn as_view(&self) -> &EmaView;
// Provided methods
fn reset_to(&mut self, _: f64) { ... }
fn reset_fast(&mut self) { ... }
fn reset_slow(&mut self) { ... }
fn set_value(&mut self, _x: f64) { ... }
}
Expand description
API for Exponential Moving Average, EMA, like get
, reset
, update
and so on.