differential_dogs3::operators::count

Function count

Source
pub fn count<G, Tr, K, R, F, P>(
    prefixes: &Collection<G, (P, usize, usize), R>,
    arrangement: Arranged<G, Tr>,
    key_selector: F,
    index: usize,
) -> Collection<G, (P, usize, usize), R>
where G: Scope<Timestamp = Tr::Time>, Tr: TraceReader<Diff = isize> + Clone + 'static, for<'a> Tr::Key<'a>: IntoOwned<'a, Owned = K>, for<'a> Tr::Diff: Semigroup<Tr::DiffGat<'a>>, K: Hashable + Ord + Default + 'static, R: Monoid + Multiply<Output = R> + ExchangeData, F: Fn(&P) -> K + Clone + 'static, P: ExchangeData,
Expand description

Reports a number of extensions to a stream of prefixes.

This method takes as input a stream of (prefix, count, index) triples. For each triple, it extracts a key using key_selector, and finds the associated count in arrangement. If the found count is less than count, the count and index fields are overwritten with their new values.