[][src]Struct midas_rs::Midas

pub struct Midas { /* fields omitted */ }

Methods

impl Midas[src]

pub fn new(
    MidasParams { rows: rows, buckets: buckets, m_value: m_value }: MidasParams
) -> Self
[src]

pub fn current_time(&self) -> Int[src]

pub fn insert(&mut self, (source, dest, time): (Int, Int, Int)) -> Float[src]

Panics

If time < self.current_time()

pub fn query(&self, source: Int, dest: Int) -> Float[src]

pub fn iterate(
    data: impl Iterator<Item = (Int, Int, Int)>,
    params: MidasParams
) -> impl Iterator<Item = Float>
[src]

Takes an iterator of (source, dest, time) thruples and returns an iterator of corresponding scores.

For a more ergonomic version, see MidasIterator::midas.

Panics

Subsequent iterator will panic if ever passed a thruple where the third element (the time) decreases from its predecessor.

Auto Trait Implementations

impl RefUnwindSafe for Midas

impl Send for Midas

impl Sync for Midas

impl Unpin for Midas

impl UnwindSafe for Midas

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,