Struct differential_dataflow::collection::count::Count [] [src]

pub struct Count<K, T, L> {
    // some fields omitted
}

A trace specialized for the value type ().

This trace does not need to represent a variable number of values associated with each key, and instead needs only one weight per timestamp.

Methods

impl<K, L, T> Count<K, T, L> where K: Data + Ord + 'static, L: Lookup<K, Offset> + 'static, T: LeastUpperBound + 'static
[src]

fn get_count(&self, key: &K, time: &T) -> i32

Recovers the count for the () value for a key at a time.

impl<K: Eq, L: Lookup<K, Offset>, T> Count<K, T, L>
[src]

fn new(l: L) -> Count<K, T, L>

Allocates a new Count from a supplied lookup.

Trait Implementations

impl<K, L, T> Trace for Count<K, T, L> where K: Data + Ord + 'static, 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 = ()

Values associated with each key.

fn set_difference(&mut self, time: T, accumulation: Compact<K, ()>)

Installs a supplied set of keys and values as the differences for 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, L, T> TraceRef<'a, K, T, ()> for &'a Count<K, T, L> where K: Ord + 'a, L: Lookup<K, Offset> + 'a, T: LeastUpperBound + 'a
[src]

type VIterator = WeightIterator<'a>

Iterator over references to values.

type TIterator = CountIterator<'a, K, T, L>

Iterator over times and VIterators.

fn trace(self, key: &K) -> Self::TIterator

Iterates over differences associated with the key.