Trait differential_dataflow::operators::threshold::Threshold
[−]
[src]
pub trait Threshold<G: Scope, K: Data> where G::Timestamp: LeastUpperBound { fn threshold<L>(&self, logic: L) -> Collection<G, K> where L: Fn(&K, Delta) -> Delta + 'static; fn distinct(&self) -> Collection<G, K> { ... } }
Extension trait for the threshold differential dataflow method
Required Methods
fn threshold<L>(&self, logic: L) -> Collection<G, K> where L: Fn(&K, Delta) -> Delta + 'static
Groups records by their first field, and applies reduction logic to the associated values.
It would be nice for this to be generic over possible arrangements of data, but it seems that Rust
ICEs when I try this. I'm not exactly sure how one would specify the arrangement (the type is used
in logic, by way of its associated iterator types, but not clearly enough to drive type inference),
but we don't have that problem yet anyhow.
In any case, it would be great if the same implementation could handle (K,V) pairs and K elements
treated as (K, ()) pairs.
Provided Methods
fn distinct(&self) -> Collection<G, K>
Collects distinct elements.
Implementors
impl<G: Scope, K: Data + Default> Threshold<G, K> for Collection<G, K> where G::Timestamp: LeastUpperBound