Struct differential_dataflow::collection::basic::BasicTrace
[−]
[src]
pub struct BasicTrace<K, T, V, L> {
// some fields omitted
}A collection of values indexed by key and time.
A BasicTrace maintains a mapping from keys of type K to offsets into a vector of
ListEntry structs, which are themselves linked-list entries of pairs of a time T
and an offset into a TimeEntry struct, which wraps a Vec<(V, i32)>.
This trie structure is easy to update as new times arrive: the new data form a new
TimeEntry, and any involved keys have elements added to their linked lists.
At the same time, its performance can degrade after large numbers of updates as the data associated with a given key becomes more and more diffuse. The trace also has no support for compaction.
Methods
impl<K: Eq, L: Lookup<K, Offset>, T, V> BasicTrace<K, T, V, L>[src]
fn new(l: L) -> BasicTrace<K, T, V, L>
Allocates a new basic trace.
Trait Implementations
impl<K, V, L, T> Trace for BasicTrace<K, T, V, L> where K: Data, V: Data, L: Lookup<K, Offset> + 'static, T: LeastUpperBound + 'static[src]
type Key = K
The data-parallel key.
type Index = T
Timestamp for changes to the collection.
type Value = V
Values associated with each key.
fn set_difference(&mut self, time: T, accumulation: Compact<K, V>)
Introduces differences in accumulation at time.
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. Read more
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.
impl<'a, K, V, L, T> TraceRef<'a, K, T, V> for &'a BasicTrace<K, T, V, L> where K: Data + 'a, V: Data + 'a, L: Lookup<K, Offset> + 'a, T: LeastUpperBound + 'a[src]
type VIterator = DifferenceIterator<'a, V>
Iterator over references to values.
type TIterator = TraceIterator<'a, K, T, V, L>
Iterator over times and VIterators.
fn trace(self, key: &K) -> Self::TIterator
Iterates over differences associated with the key.