Trait differential_dataflow::algorithms::identifiers::Identifiers[][src]

pub trait Identifiers<G: Scope, D: ExchangeData, R: ExchangeData + Abelian> {
    fn identifiers(&self) -> Collection<G, (D, u64), R>;
}

Assign unique identifiers to elements of a collection.

Required methods

fn identifiers(&self) -> Collection<G, (D, u64), R>[src]

Assign unique identifiers to elements of a collection.

Example

extern crate timely;
extern crate differential_dataflow;

use differential_dataflow::input::Input;
use differential_dataflow::algorithms::identifiers::Identifiers;
use differential_dataflow::operators::Threshold;

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

        let identifiers =
        scope.new_collection_from(1 .. 10).1
             .identifiers()
             // assert no conflicts
             .map(|(data, id)| id)
             .threshold(|_id,cnt| if cnt > &1 { *cnt } else { 0 })
             .assert_empty();
    });
}
Loading content...

Implementors

impl<G, D, R> Identifiers<G, D, R> for Collection<G, D, R> where
    G: Scope,
    G::Timestamp: Lattice,
    D: ExchangeData + Hash,
    R: ExchangeData + Abelian
[src]

Loading content...