diff -r 99a31b399b59 -r 65fbcf2f978a test/bfs_test.cc --- a/test/bfs_test.cc Tue Apr 14 10:40:33 2009 +0100 +++ b/test/bfs_test.cc Wed Apr 15 03:26:45 2009 +0200 @@ -58,41 +58,80 @@ typedef Digraph::Arc Arc; Digraph G; - Node s, t; + Node s, t, n; Arc e; - int l; + int l, i; bool b; BType::DistMap d(G); BType::PredMap p(G); Path pp; + concepts::ReadMap nm; { BType bfs_test(G); + const BType& const_bfs_test = bfs_test; bfs_test.run(s); bfs_test.run(s,t); bfs_test.run(); - l = bfs_test.dist(t); - e = bfs_test.predArc(t); - s = bfs_test.predNode(t); - b = bfs_test.reached(t); - d = bfs_test.distMap(); - p = bfs_test.predMap(); - pp = bfs_test.path(t); + bfs_test.init(); + bfs_test.addSource(s); + n = bfs_test.processNextNode(); + n = bfs_test.processNextNode(t, b); + n = bfs_test.processNextNode(nm, n); + n = const_bfs_test.nextNode(); + b = const_bfs_test.emptyQueue(); + i = const_bfs_test.queueSize(); + + bfs_test.start(); + bfs_test.start(t); + bfs_test.start(nm); + + l = const_bfs_test.dist(t); + e = const_bfs_test.predArc(t); + s = const_bfs_test.predNode(t); + b = const_bfs_test.reached(t); + d = const_bfs_test.distMap(); + p = const_bfs_test.predMap(); + pp = const_bfs_test.path(t); } { BType ::SetPredMap > ::SetDistMap > ::SetReachedMap > + ::SetStandardProcessedMap ::SetProcessedMap > - ::SetStandardProcessedMap ::Create bfs_test(G); + + concepts::ReadWriteMap pred_map; + concepts::ReadWriteMap dist_map; + concepts::ReadWriteMap reached_map; + concepts::WriteMap processed_map; + + bfs_test + .predMap(pred_map) + .distMap(dist_map) + .reachedMap(reached_map) + .processedMap(processed_map); bfs_test.run(s); bfs_test.run(s,t); bfs_test.run(); + + bfs_test.init(); + bfs_test.addSource(s); + n = bfs_test.processNextNode(); + n = bfs_test.processNextNode(t, b); + n = bfs_test.processNextNode(nm, n); + n = bfs_test.nextNode(); + b = bfs_test.emptyQueue(); + i = bfs_test.queueSize(); + + bfs_test.start(); + bfs_test.start(t); + bfs_test.start(nm); l = bfs_test.dist(t); e = bfs_test.predArc(t);