diff --git a/test/dijkstra_test.cc b/test/dijkstra_test.cc --- a/test/dijkstra_test.cc +++ b/test/dijkstra_test.cc @@ -60,48 +60,94 @@ typedef Digraph::Arc Arc; Digraph G; - Node s, t; + Node s, t, n; Arc e; VType l; + int i; bool b; DType::DistMap d(G); DType::PredMap p(G); LengthMap length; Path pp; + concepts::ReadMap nm; { DType dijkstra_test(G,length); + const DType& const_dijkstra_test = dijkstra_test; dijkstra_test.run(s); dijkstra_test.run(s,t); + dijkstra_test.init(); + dijkstra_test.addSource(s); + dijkstra_test.addSource(s, 1); + n = dijkstra_test.processNextNode(); + n = const_dijkstra_test.nextNode(); + b = const_dijkstra_test.emptyQueue(); + i = const_dijkstra_test.queueSize(); + + dijkstra_test.start(); + dijkstra_test.start(t); + dijkstra_test.start(nm); + + l = const_dijkstra_test.dist(t); + e = const_dijkstra_test.predArc(t); + s = const_dijkstra_test.predNode(t); + b = const_dijkstra_test.reached(t); + b = const_dijkstra_test.processed(t); + d = const_dijkstra_test.distMap(); + p = const_dijkstra_test.predMap(); + pp = const_dijkstra_test.path(t); + l = const_dijkstra_test.currentDist(t); + } + { + DType + ::SetPredMap > + ::SetDistMap > + ::SetStandardProcessedMap + ::SetProcessedMap > + ::SetOperationTraits > + ::SetHeap > > + ::SetStandardHeap > > + ::SetHeap >, + concepts::ReadWriteMap > + ::Create dijkstra_test(G,length); + + LengthMap length_map; + concepts::ReadWriteMap pred_map; + concepts::ReadWriteMap dist_map; + concepts::WriteMap processed_map; + concepts::ReadWriteMap heap_cross_ref; + BinHeap > heap(heap_cross_ref); + + dijkstra_test + .lengthMap(length_map) + .predMap(pred_map) + .distMap(dist_map) + .processedMap(processed_map) + .heap(heap, heap_cross_ref); + + dijkstra_test.run(s); + dijkstra_test.run(s,t); + + dijkstra_test.addSource(s); + dijkstra_test.addSource(s, 1); + n = dijkstra_test.processNextNode(); + n = dijkstra_test.nextNode(); + b = dijkstra_test.emptyQueue(); + i = dijkstra_test.queueSize(); + + dijkstra_test.start(); + dijkstra_test.start(t); + dijkstra_test.start(nm); + l = dijkstra_test.dist(t); e = dijkstra_test.predArc(t); s = dijkstra_test.predNode(t); b = dijkstra_test.reached(t); - d = dijkstra_test.distMap(); - p = dijkstra_test.predMap(); + b = dijkstra_test.processed(t); pp = dijkstra_test.path(t); - } - { - DType - ::SetPredMap > - ::SetDistMap > - ::SetProcessedMap > - ::SetStandardProcessedMap - ::SetOperationTraits > - ::SetHeap > > - ::SetStandardHeap > > - ::Create dijkstra_test(G,length); - - dijkstra_test.run(s); - dijkstra_test.run(s,t); - - l = dijkstra_test.dist(t); - e = dijkstra_test.predArc(t); - s = dijkstra_test.predNode(t); - b = dijkstra_test.reached(t); - pp = dijkstra_test.path(t); + l = dijkstra_test.currentDist(t); } }