Struct differential_dataflow::Collection [] [src]

pub struct Collection<G: Scope, D: Data> {
    pub inner: Stream<G, (D, Delta)>,
}

A mutable collection of values of type D

Fields

inner: Stream<G, (D, Delta)>

Underlying timely dataflow stream.

Methods

impl<G: Scope, D: Data> Collection<G, D>
[src]

fn new(stream: Stream<G, (D, Delta)>) -> Collection<G, D>

Creates a new collection from a timely dataflow stream.

fn map<D2: Data, L: Fn(D) -> D2 + 'static>(&self, logic: L) -> Collection<G, D2>

Applies the supplied function to each element of the collection.

fn map_in_place<L: Fn(&mut D) + 'static>(&self, logic: L) -> Collection<G, D>

Applies the supplied function to each element of the collection, re-using allocated memory.

fn flat_map<D2: Data, I: Iterator<Item=D2>, L: Fn(D) -> I + 'static>(&self, logic: L) -> Collection<G, D2>

Applies the supplied function to each element of the collection.

fn negate(&self) -> Collection<G, D>

Negates the counts of each element in the collection.

fn filter<L: Fn(&D) -> bool + 'static>(&self, logic: L) -> Collection<G, D>

Retains only the elements of the collection satisifying the supplied predicate.

fn concat(&self, other: &Collection<G, D>) -> Collection<G, D>

Adds the counts of elements from each collection.

fn enter<'a, T: Timestamp>(&self, child: &Child<'a, G, T>) -> Collection<Child<'a, G, T>, D>

Brings a collection into a nested scope.

fn enter_at<'a, T: Timestamp, F>(&self, child: &Child<'a, G, T>, initial: F) -> Collection<Child<'a, G, T>, D> where F: Fn(&(D, Delta)) -> T + 'static, G::Timestamp: Hash, T: Hash

Brings a collection into a nested scope, at varying times.

The initial function indicates the time at which each element of the collection should appear.

fn inspect<F: FnMut(&(D, Delta)) + 'static>(&self, func: F) -> Collection<G, D>

Applies a supplied function to each update. Diagnostic.

fn inspect_batch<F: FnMut(&G::Timestamp, &[(D, Delta)]) + 'static>(&self, func: F) -> Collection<G, D>

Applies a supplied function to each batch of updates. Diagnostic.

fn probe(&self) -> (Handle<G::Timestamp>, Collection<G, D>)

Attaches a timely dataflow probe to the output of a collection.

This probe is used to determine when the state of the collection has stabilized and can be read out.

fn scope(&self) -> G

The scope containing the underlying timely dataflow stream.

impl<'a, G: Scope, T: Timestamp, D: Data> Collection<Child<'a, G, T>, D>
[src]

fn leave(&self) -> Collection<G, D>

Returns the final value of a collection from a nested scope to its containing scope.

Trait Implementations

impl<G: Scope, K: Data, V: Data> ArrangeByKey<G, K, V> for Collection<G, (K, V)> where G::Timestamp: LeastUpperBound
[src]

fn arrange_by_key<U: Unsigned + Default, KH: Fn(&K) -> U + 'static, Look: Lookup<K, Offset> + 'static, LookG: Fn(u64) -> Look>(&self, key_h: KH, look: LookG) -> Arranged<G, BasicTrace<K, G::Timestamp, V, Look>>

Arranges a stream of (Key, Val) updates by Key. Read more

impl<G: Scope, K: Data> ArrangeBySelf<G, K> for Collection<G, K> where G::Timestamp: LeastUpperBound
[src]

fn arrange_by_self<U: Unsigned + Default, KH: Fn(&K) -> U + 'static, Look: Lookup<K, Offset> + 'static, LookG: Fn(u64) -> Look>(&self, key_h: KH, look: LookG) -> Arranged<G, Count<K, G::Timestamp, Look>> where G::Timestamp: LeastUpperBound

Arranges a stream of (Key, ())) updates by Key. Read more

impl<G: Scope, K: Data + Default> Threshold<G, K> for Collection<G, K> where G::Timestamp: LeastUpperBound
[src]

fn threshold<L>(&self, logic: L) -> Collection<G, K> where L: Fn(&K, Delta) -> Delta + 'static

Groups records by their first field, and applies reduction logic to the associated values. Read more

fn distinct(&self) -> Collection<G, K>

Collects distinct elements.

impl<G: Scope, U: Unsigned + Data + Default> ThresholdUnsigned<G, U> for Collection<G, U> where G::Timestamp: LeastUpperBound
[src]

fn threshold_u<L>(&self, logic: L) -> Collection<G, U> where L: Fn(&U, Delta) -> Delta + 'static

Groups records by their first field, when this field implements Unsigned. Read more

fn distinct_u(&self) -> Collection<G, U>

Collects distinct elements, when they implement Unsigned.

impl<G: Scope, K: Data + Default, V: Data + Default> Group<G, K, V> for Collection<G, (K, V)> where G::Timestamp: LeastUpperBound
[src]

fn group<L, V2: Data>(&self, logic: L) -> Collection<G, (K, V2)> where L: Fn(&K, &mut CollectionIterator<DifferenceIterator<V>>, &mut Vec<(V2, Delta)>) + 'static

Groups records by their first field, and applies reduction logic to the associated values. Read more

impl<G: Scope, K: Data + Default> Count<G, K> for Collection<G, K> where G::Timestamp: LeastUpperBound
[src]

fn count(&self) -> Collection<G, (K, Delta)>

Counts the number of occurrences of each element.

impl<G: Scope, U: Unsigned + Data + Default, V: Data> GroupUnsigned<G, U, V> for Collection<G, (U, V)> where G::Timestamp: LeastUpperBound
[src]

fn group_u<L, V2: Data>(&self, logic: L) -> Collection<G, (U, V2)> where L: Fn(&U, &mut CollectionIterator<DifferenceIterator<V>>, &mut Vec<(V2, i32)>) + 'static

Groups records by their first field, when this field implements Unsigned. Read more

impl<G: Scope, U: Unsigned + Data + Default> CountUnsigned<G, U> for Collection<G, U> where G::Timestamp: LeastUpperBound
[src]

fn count_u(&self) -> Collection<G, (U, Delta)>

Counts the number of occurrences of each unsigned element.

impl<G: Scope, D: Ord + Data + Debug> ConsolidateExt<D> for Collection<G, D>
[src]

fn consolidate(&self) -> Self

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

fn consolidate_by<U: Unsigned, F: Fn(&D) -> U + 'static>(&self, part: F) -> Self

Aggregates the weights of equal records into at most one record, partitions the data using the supplied partition function. Read more

impl<G: Scope, D: Ord + Data + Debug> IterateExt<G, D> for Collection<G, D>
[src]

fn iterate<F>(&self, logic: F) -> Collection<G, D> where G::Timestamp: LeastUpperBound, F: FnOnce(&Collection<Child<'a, G, u64>, D>) -> Collection<Child<'a, G, u64>, D>

Iteratively apply logic to the source collection until convergence.

impl<G: Scope, K: Data, V: Data> Join<G, K, V> for Collection<G, (K, V)> where G::Timestamp: LeastUpperBound
[src]

fn join_map<V2: Data, D: Data, R>(&self, other: &Collection<G, (K, V2)>, logic: R) -> Collection<G, D> where R: Fn(&K, &V, &V2) -> D + 'static

Matches pairs of (key,val1) and (key,val2) records based on key and applies a reduction function.

fn semijoin(&self, other: &Collection<G, K>) -> Collection<G, (K, V)>

Matches pairs (key,val1) and key based on key, filtering the first collection by values present in the second. Read more

fn join<V2: Data>(&self, other: &Collection<G, (K, V2)>) -> Collection<G, (K, V, V2)>

Matches pairs (key,val1) and (key,val2) based on key. Read more

impl<G: Scope, U: Unsigned + Data + Default, V: Data> JoinUnsigned<G, U, V> for Collection<G, (U, V)> where G::Timestamp: LeastUpperBound
[src]

fn join_map_u<V2: Data, D: Data, R: Fn(&U, &V, &V2) -> D + 'static>(&self, other: &Collection<G, (U, V2)>, logic: R) -> Collection<G, D>

Joins two collections with dense unsigned integer keys and then applies a map function. Read more

fn semijoin_u(&self, other: &Collection<G, U>) -> Collection<G, (U, V)>

Semijoins a collection with dense unsigned integer keys against a set of such keys. Read more

fn join_u<V2: Data>(&self, other: &Collection<G, (U, V2)>) -> Collection<G, (U, V, V2)>

Joins two collections with dense unsigned integer keys. Read more

impl<G: Clone + Scope, D: Clone + Data> Clone for Collection<G, D>
[src]

fn clone(&self) -> Collection<G, D>

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more