[][src]Struct tsf_rs::TSF

pub struct TSF { /* fields omitted */ }

TimeSeries Forecast (TSF)

 use tsf_rs::TSF;
 use ta_common::traits::Indicator;
let mut tsf = TSF::new(5);
assert_eq!(tsf.next(81.59), None);
assert_eq!(tsf.next(81.06), None);
assert_eq!(tsf.next(82.87), None);
assert_eq!(tsf.next(83.00), None);
assert_eq!(tsf.next(83.61), Some(84.22));
assert_eq!(tsf.next(83.15), Some(84.21399999999998));
assert_eq!(tsf.next(82.84), Some(83.12099999999998));
assert_eq!(tsf.next(83.99), Some(83.68099999999998));
assert_eq!(tsf.next(84.55), Some(84.44399999999997));
assert_eq!(tsf.next(84.36), Some(85.017));
assert_eq!(tsf.next(85.53), Some(85.97899999999998));
assert_eq!(tsf.next(86.54), Some(86.81799999999997));
assert_eq!(tsf.next(86.89), Some(87.63199999999998));
assert_eq!(tsf.next(87.77), Some(88.67199999999997));
assert_eq!(tsf.next(87.29), Some(88.22899999999996));

Implementations

impl TSF[src]

pub fn new(period: u32) -> TSF[src]

Trait Implementations

impl Indicator<f64, Option<f64>> for TSF[src]

Auto Trait Implementations

impl RefUnwindSafe for TSF

impl Send for TSF

impl Sync for TSF

impl Unpin for TSF

impl UnwindSafe for TSF

Blanket Implementations

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

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

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

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

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

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> 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.