[][src]Trait differential_dataflow::operators::consolidate::Consolidate

pub trait Consolidate<D: ExchangeData + Hashable>: Sized {
    fn consolidate_named(&self, name: &str) -> Self;

    fn consolidate(&self) -> Self { ... }
}

An extension method for consolidating weighted streams.

Required methods

fn consolidate_named(&self, name: &str) -> Self

As consolidate but with the ability to name the operator.

Loading content...

Provided methods

fn consolidate(&self) -> Self

Aggregates the weights of equal records into at most one record.

This method uses the type D's hashed() method to partition the data. The data are accumulated in place, each held back until their timestamp has completed.

Examples

extern crate timely;
extern crate differential_dataflow;

use differential_dataflow::input::Input;
use differential_dataflow::operators::Consolidate;

fn main() {
    ::timely::example(|scope| {

        let x = scope.new_collection_from(1 .. 10u32).1;

        x.negate()
         .concat(&x)
         .consolidate() // <-- ensures cancellation occurs
         .assert_empty();
    });
}
Loading content...

Implementors

impl<G: Scope, D, R> Consolidate<D> for Collection<G, D, R> where
    D: ExchangeData + Hashable,
    R: ExchangeData + Semigroup,
    G::Timestamp: Lattice + Ord
[src]

Loading content...