[][src]Struct one_euro_rs::OneEuroFilter

pub struct OneEuroFilter<T: FloatCore> {
    pub configuration: OneEuroFilterConfiguration<T>,
    // some fields omitted
}

Representation of a OneEuroFilter.

Examples

let mut one_euro = OneEuroFilter::new(120.0, 1.0, 1.0, 1.0);

one_euro.filter(1.0);
one_euro.filter(1.1);
one_euro.filter(0.9);
one_euro.filter(99999.9);
one_euro.filter(1.01);
one_euro.filter(1.04);
one_euro.filter(0.00);

Fields

configuration: OneEuroFilterConfiguration<T>

Methods

impl<T: FloatCore> OneEuroFilter<T>[src]

pub fn new(
    frequency: T,
    cutoff_min: T,
    cutoff_d: T,
    beta: T
) -> OneEuroFilter<T>
[src]

pub fn from_configuration(
    configuration: OneEuroFilterConfiguration<T>
) -> OneEuroFilter<T>
[src]

impl<T: FloatCore + FloatConst> OneEuroFilter<T>[src]

pub fn filter(&mut self, x: T) -> T[src]

pub fn filter_with_timestamp(&mut self, value: T, timestamp: T) -> T[src]

Trait Implementations

impl<T: Debug + FloatCore> Debug for OneEuroFilter<T>[src]

impl<T: Clone + FloatCore> Clone for OneEuroFilter<T>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<T> Unpin for OneEuroFilter<T> where
    T: Unpin

impl<T> Send for OneEuroFilter<T> where
    T: Send

impl<T> Sync for OneEuroFilter<T> where
    T: Sync

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]