pub fn propagate<G, N, L>(edges: &Collection<G, (N,N)>, nodes: &Collection<G,(N,L)>) -> Collection<G,(N,L)>
where
    G: Scope,
    G::Timestamp: Lattice+Ord,
    N: Data+Hash,
    L: Data,
{
    nodes.filter(|_| false)
         .iterate(|inner| {
             let edges = edges.enter(&inner.scope());
             let nodes = nodes.enter(&inner.scope());

             inner.join_map(&edges, |_k,l,d| (d.clone(),l.clone()))
                  .concat(&nodes)
                  .reduce(|_, s, t| t.push((s[0].0.clone(), 1)))

         })
}
/// Propagates labels forward, retaining the minimum label.
Propagates labels forward, retaining the minimum label.
Propagates labels forward retaining the minimum label .
pub fn propagate<G, N, L>(edges: &Collection<G, (N,N)>, nodes: &Collection<G,(N,L)>) -> Collection<G,(N,L)>
where
    G: Scope,
    G::Timestamp: Lattice+Ord,
    N: Data+Hash,
    L: Data,
{
    nodes.filter(|_| false)
         .iterate(|inner| {
             let edges = edges.enter(&inner.scope());
             let nodes = nodes.enter(&inner.scope());
             inner.join_map(&edges, |_k,l,d| (d.clone(),l.clone()))
                  .concat(&nodes)
                  .reduce(|_, s, t| t.push((s[0].0.clone(), 1)))
         })
}
pub fn propagate < G , N , L > ( edges : & Collection < G , ( N , N ) > , nodes : & Collection < G , ( N , L ) > ) -> Collection < G , ( N , L ) > where G : Scope , G :: Timestamp : Lattice + Ord , N : Data + Hash , L : Data , { nodes . filter ( | _ | false ) . iterate ( | inner | { let edges = edges . enter ( & inner . scope ( ) ) ; let nodes = nodes . enter ( & inner . scope ( ) ) ; inner . join_map ( & edges , | _k , l , d | ( d . clone ( ) , l . clone ( ) ) ) . concat ( & nodes ) . reduce ( | _ , s , t | t . push ( ( s [ 0 ] . 0 . clone ( ) , 1 ) ) ) } ) }
Propagates labels forward, retaining the minimum label.
Propagates labels forward retaining the minimum label .
edges
&Collection<G, (N,N)>
nodes
&Collection<G,(N,L)>
edges
&Collection<G, (N,N)>
nodes
&Collection<G,(N,L)>