Trait differential_dataflow::collection::trace::Trace
[−]
[src]
pub trait Trace where &'a Self: TraceRef<'a, Self::Key, Self::Index, Self::Value> { type Key: Data; type Index: LeastUpperBound; type Value: Data; fn set_difference(&mut self, time: Self::Index, accumulation: Compact<Self::Key, Self::Value>); fn trace<'a>(&'a self, key: &Self::Key) -> &'a Self::TIterator { ... } fn get_difference<'a>(&'a self, key: &Self::Key, time: &Self::Index) -> Option<&'a Self::VIterator> { ... } fn get_collection<'a>(&'a mut self, key: &Self::Key, time: &Self::Index) -> CollectionIterator<&'a Self::VIterator> { ... } fn interesting_times<'a>(&'a self, key: &Self::Key, time: &Self::Index, stash: &mut Vec<Self::Index>) { ... } }
A collection trace, corresponding to quadruples (Key, Index, Value, Delta).
Associated Types
type Key: Data
The data-parallel key.
type Index: LeastUpperBound
Timestamp for changes to the collection.
type Value: Data
Values associated with each key.
Required Methods
fn set_difference(&mut self, time: Self::Index, accumulation: Compact<Self::Key, Self::Value>)
Introduces differences in accumulation at time.
Provided Methods
fn trace<'a>(&'a self, key: &Self::Key) -> &'a Self::TIterator
Iterates over times and differences for a specified key.
fn get_difference<'a>(&'a self, key: &Self::Key, time: &Self::Index) -> Option<&'a Self::VIterator>
Iterates over differences for a specified key and time.
fn get_collection<'a>(&'a mut self, key: &Self::Key, time: &Self::Index) -> CollectionIterator<&'a Self::VIterator>
Accumulates differences for key at times less than or equal to time.
The &mut self argument allows the trace to use stashed storage for a merge.
This is currently not done, because it appears to require unsafe (the storage
type involves a &'a, which cannot outlive this method).
fn interesting_times<'a>(&'a self, key: &Self::Key, time: &Self::Index, stash: &mut Vec<Self::Index>)
Populates stash with times for key, closes under least upper bound.
Implementors
impl<K, L, T> Trace for Count<K, T, L> where K: Data + Ord + 'static, L: Lookup<K, Offset> + 'static, T: LeastUpperBound + 'staticimpl<K, V, L, T> Trace for BasicTrace<K, T, V, L> where K: Data, V: Data, L: Lookup<K, Offset> + 'static, T: LeastUpperBound + 'static