differential_dogs3

Trait PrefixExtender

Source
pub trait PrefixExtender<G: Scope, R: Monoid + Multiply<Output = R>> {
    type Prefix;
    type Extension;

    // Required methods
    fn count(
        &mut self,
        prefixes: &Collection<G, (Self::Prefix, usize, usize), R>,
        index: usize,
    ) -> Collection<G, (Self::Prefix, usize, usize), R>;
    fn propose(
        &mut self,
        prefixes: &Collection<G, Self::Prefix, R>,
    ) -> Collection<G, (Self::Prefix, Self::Extension), R>;
    fn validate(
        &mut self,
        extensions: &Collection<G, (Self::Prefix, Self::Extension), R>,
    ) -> Collection<G, (Self::Prefix, Self::Extension), R>;
}
Expand description

A type capable of extending a stream of prefixes.

Implementors of PrefixExtension provide types and methods for extending a differential dataflow collection, via the three methods count, propose, and validate.

Required Associated Types§

Source

type Prefix

The required type of prefix to extend.

Source

type Extension

The type to be produced as extension.

Required Methods§

Source

fn count( &mut self, prefixes: &Collection<G, (Self::Prefix, usize, usize), R>, index: usize, ) -> Collection<G, (Self::Prefix, usize, usize), R>

Annotates prefixes with the number of extensions the relation would propose.

Source

fn propose( &mut self, prefixes: &Collection<G, Self::Prefix, R>, ) -> Collection<G, (Self::Prefix, Self::Extension), R>

Extends each prefix with corresponding extensions.

Source

fn validate( &mut self, extensions: &Collection<G, (Self::Prefix, Self::Extension), R>, ) -> Collection<G, (Self::Prefix, Self::Extension), R>

Restricts proposed extensions by those the extender would have proposed.

Implementors§

Source§

impl<G, K, V, R, P, F> PrefixExtender<G, R> for CollectionExtender<K, V, G::Timestamp, R, P, F>
where G: Scope, K: ExchangeData + Hash + Default, V: ExchangeData + Hash + Default, P: ExchangeData, G::Timestamp: Lattice + ExchangeData, R: Monoid + Multiply<Output = R> + ExchangeData, F: Fn(&P) -> K + Clone + 'static,