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

pub trait Consolidate<D: Data + Hashable> {
    fn consolidate(&self) -> Self;
}

An extension method for consolidating weighted streams.

Required Methods

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();
    });
}

Implementors