equal
deleted
inserted
replaced
81 |
81 |
82 for(NodeIt v(G); v!=INVALID; ++v) { |
82 for(NodeIt v(G); v!=INVALID; ++v) { |
83 check(dfs_test.reached(v),"Each node should be reached."); |
83 check(dfs_test.reached(v),"Each node should be reached."); |
84 if ( dfs_test.pred(v)!=INVALID ) { |
84 if ( dfs_test.pred(v)!=INVALID ) { |
85 Edge e=dfs_test.pred(v); |
85 Edge e=dfs_test.pred(v); |
86 Node u=G.tail(e); |
86 Node u=G.source(e); |
87 check(u==dfs_test.predNode(v),"Wrong tree."); |
87 check(u==dfs_test.predNode(v),"Wrong tree."); |
88 check(dfs_test.dist(v) - dfs_test.dist(u) == 1, |
88 check(dfs_test.dist(v) - dfs_test.dist(u) == 1, |
89 "Wrong distance." << dfs_test.dist(v) << " " <<dfs_test.dist(u) ); |
89 "Wrong distance." << dfs_test.dist(v) << " " <<dfs_test.dist(u) ); |
90 } |
90 } |
91 } |
91 } |