Struct differential_dataflow::operators::iterate::Variable
[−]
[src]
pub struct Variable<'a, G: Scope, D: Data> where
G::Timestamp: Lattice, { /* fields omitted */ }
A differential dataflow collection variable
The Variable
struct allows differential dataflow programs requiring more sophisticated
iterative patterns than singly recursive iteration. For example: in mutual recursion two
collections evolve simultaneously.
Methods
impl<'a, G: Scope, D: Data> Variable<'a, G, D> where
G::Timestamp: Lattice,
[src]
G::Timestamp: Lattice,
fn from(source: Collection<Child<'a, G, u64>, D>) -> Variable<'a, G, D>
Creates a new Variable
and a Stream
representing its output, from a supplied source
stream.
fn set(
self,
result: &Collection<Child<'a, G, u64>, D>
) -> Collection<Child<'a, G, u64>, D>
self,
result: &Collection<Child<'a, G, u64>, D>
) -> Collection<Child<'a, G, u64>, D>
Adds a new source of data to the Variable
.
Methods from Deref<Target = Collection<Child<'a, G, u64>, D>>
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>
&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>
&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,
&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>
&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.
fn leave(&self) -> Collection<G, D>
Returns the final value of a collection from a nested scope to its containing scope.
Trait Implementations
impl<'a, G: Scope, D: Data> Deref for Variable<'a, G, D> where
G::Timestamp: Lattice,
[src]
G::Timestamp: Lattice,