Skip to content

Commit

Permalink
zero iters means unbounded
Browse files Browse the repository at this point in the history
  • Loading branch information
frankmcsherry committed Mar 31, 2019
1 parent 1f0cd35 commit de1464d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions examples/pagerank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,19 @@ where
.map(|(node, _degr)| node);

// Propagate surfers along links, blend in reset surfers.
let pushed =
let mut pushed =
edges.semijoin(&to_push)
.map(|(_node, dest)| dest)
.concat(&reset)
.consolidate()
.consolidate();

if iters > 0 {
pushed =
pushed
.inner
.filter(move |(_d,t,_r)| t.inner < iters)
.as_collection();
}

// Bind the recursive variable, return its limit.
ranks.set(&pushed);
Expand Down

0 comments on commit de1464d

Please sign in to comment.