Trait Node

Source
pub trait Node<Input> {
    type Output;

    // Required method
    fn process(&mut self, input: Input) -> Self::Output;

    // Provided methods
    fn reset(&mut self) { ... }
    fn data_remaining(&self, before: usize) -> usize { ... }
}

Required Associated Types§

Required Methods§

Source

fn process(&mut self, input: Input) -> Self::Output

Process a batch of data

Provided Methods§

Source

fn reset(&mut self)

Reset signal propogates through pipeline

Source

fn data_remaining(&self, before: usize) -> usize

Get number of examples left

Implementations on Foreign Types§

Source§

impl<Input, M2: Node<M1::Output>, M1: Node<Input>> Node<Input> for (M1, M2)

Source§

type Output = <M2 as Node<<M1 as Node<Input>>::Output>>::Output

Source§

fn process(&mut self, x: Input) -> Self::Output

Source§

fn reset(&mut self)

Source§

fn data_remaining(&self, before: usize) -> usize

Source§

impl<Input, M3: Node<M2::Output>, M2: Node<M1::Output>, M1: Node<Input>> Node<Input> for (M1, M2, M3)

Source§

type Output = <M3 as Node<<M2 as Node<<M1 as Node<Input>>::Output>>::Output>>::Output

Source§

fn process(&mut self, x: Input) -> Self::Output

Source§

fn reset(&mut self)

Source§

fn data_remaining(&self, before: usize) -> usize

Source§

impl<Input, M4: Node<M3::Output>, M3: Node<M2::Output>, M2: Node<M1::Output>, M1: Node<Input>> Node<Input> for (M1, M2, M3, M4)

Source§

type Output = <M4 as Node<<M3 as Node<<M2 as Node<<M1 as Node<Input>>::Output>>::Output>>::Output>>::Output

Source§

fn process(&mut self, x: Input) -> Self::Output

Source§

fn reset(&mut self)

Source§

fn data_remaining(&self, before: usize) -> usize

Source§

impl<Input, M5: Node<M4::Output>, M4: Node<M3::Output>, M3: Node<M2::Output>, M2: Node<M1::Output>, M1: Node<Input>> Node<Input> for (M1, M2, M3, M4, M5)

Source§

type Output = <M5 as Node<<M4 as Node<<M3 as Node<<M2 as Node<<M1 as Node<Input>>::Output>>::Output>>::Output>>::Output>>::Output

Source§

fn process(&mut self, x: Input) -> Self::Output

Source§

fn reset(&mut self)

Source§

fn data_remaining(&self, before: usize) -> usize

Source§

impl<Input, M6: Node<M5::Output>, M5: Node<M4::Output>, M4: Node<M3::Output>, M3: Node<M2::Output>, M2: Node<M1::Output>, M1: Node<Input>> Node<Input> for (M1, M2, M3, M4, M5, M6)

Source§

type Output = <M6 as Node<<M5 as Node<<M4 as Node<<M3 as Node<<M2 as Node<<M1 as Node<Input>>::Output>>::Output>>::Output>>::Output>>::Output>>::Output

Source§

fn process(&mut self, x: Input) -> Self::Output

Source§

fn reset(&mut self)

Source§

fn data_remaining(&self, before: usize) -> usize

Implementors§

Source§

impl Node<Vec<()>> for FileLoader

Source§

impl Node<Vec<usize>> for KeyedLoader

Source§

impl<I1, I2, N1: Node<I1>, N2: Node<I2>> Node<(I1, I2)> for Pair<I1, I2, N1, N2>

Source§

type Output = (<N1 as Node<I1>>::Output, <N2 as Node<I2>>::Output)

Source§

impl<I> Node<I> for Pipeline

Source§

impl<I, F: FnMut(&I) -> bool> Node<Vec<I>> for Filter<I, F>

Source§

impl<I, K: Ord, V, O, Map: Fn(I) -> Vec<(K, V)>, Reduce: Fn((K, Vec<V>)) -> Vec<O>> Node<Vec<I>> for MapReduce<I, K, V, O, Map, Reduce>

Source§

impl<I, O> Node<Vec<I>> for BalancedSelector<I, O>

Source§

impl<I, O, F: FnMut(I) -> O> Node<I> for F

Source§

impl<I, O, N: Node<I, Output = Option<O>>> Node<Vec<I>> for FilterMap<I, N>

Source§

impl<I, O, N: Node<I, Output = O>> Node<Vec<I>> for Map<I, N>

Source§

impl<I, O, S, F: Fn(I, &mut S) -> O, R: Fn(usize) -> usize> Node<I> for Stateful<I, O, S, F, R>

Source§

impl<T> Node<Vec<T>> for Batch<T>

Source§

impl<T> Node<Vec<T>> for Shuffle<T>

Source§

impl<T, F: Fn(&T, &T) -> Ordering> Node<Vec<T>> for Sort<T, F>

Source§

impl<T: Clone> Node<T> for Duplicator<T>

Source§

impl<const B: usize, T> Node<Vec<T>> for ArrayBatch<B, T>