Trait differential_dataflow::operators::count::CountTotal
source · pub trait CountTotal<G: Scope, K: Data, R: Diff>where
G::Timestamp: TotalOrder + Lattice + Ord,{
fn count_total(&self) -> Collection<G, (K, R), isize>;
}Expand description
Extension trait for the count differential dataflow method.
Required Methods
sourcefn count_total(&self) -> Collection<G, (K, R), isize>
fn count_total(&self) -> Collection<G, (K, R), isize>
Counts the number of occurrences of each element.
Examples
extern crate timely;
extern crate differential_dataflow;
use differential_dataflow::input::Input;
use differential_dataflow::operators::CountTotal;
fn main() {
::timely::example(|scope| {
// report the number of occurrences of each key
scope.new_collection_from(1 .. 10).1
.map(|x| x / 3)
.count_total();
});
}