1.1 --- a/src/benchmark/bfs-bench.cc Wed Aug 25 18:55:57 2004 +0000
1.2 +++ b/src/benchmark/bfs-bench.cc Mon Aug 30 12:01:47 2004 +0000
1.3 @@ -48,7 +48,7 @@
1.4 Node n(Q.front());
1.5 Node m;
1.6 Q.pop();
1.7 - for(OutEdgeIt e(G,n);G.valid(e);G.next(e))
1.8 + for(OutEdgeIt e(G,n);e!=INVALID;++e)
1.9 if(!visited[m=G.head(e)]) {
1.10 Q.push(m);
1.11 visited.set(m,true);
1.12 @@ -76,7 +76,7 @@
1.13 do {
1.14 Node m;
1.15 Node n=Q[Qt++];
1.16 - for(OutEdgeIt e(G,n);G.valid(e);G.next(e))
1.17 + for(OutEdgeIt e(G,n);e!=INVALID;++e)
1.18 if(!visited[m=G.head(e)]) {
1.19 Q[Qh++]=m;
1.20 visited.set(m,true);
1.21 @@ -91,8 +91,8 @@
1.22
1.23 int i=0;
1.24
1.25 - for(NodeIt n(G);G.valid(n);G.next(n))
1.26 - for(OutEdgeIt e(G,n);G.valid(e);G.next(e))
1.27 + for(NodeIt n(G);n!=INVALID;++n)
1.28 + for(OutEdgeIt e(G,n);e!=INVALID;++e)
1.29 i++;
1.30 }
1.31