#include "test_tools.h" #include #include using namespace hugo; const int PET_SIZE =5; void check_Dijkstra_SmartGraph_BinHeap_Compile() { typedef int VType; typedef SmartGraph Graph; typedef Graph::Edge Edge; typedef Graph::Node Node; typedef Graph::EdgeIt EdgeIt; typedef Graph::NodeIt NodeIt; typedef Graph::EdgeMap LengthMap; typedef Dijkstra DType; Graph G; Node n; Edge e; VType l; bool b; DType::DistMap d(G); DType::PredMap p(G); DType::PredNodeMap pn(G); LengthMap cap(G); DType dijkstra_test(G,cap); dijkstra_test.run(n); l = dijkstra_test.dist(n); e = dijkstra_test.pred(n); n = dijkstra_test.predNode(n); d = dijkstra_test.distMap(); p = dijkstra_test.predMap(); pn = dijkstra_test.predNodeMap(); b = dijkstra_test.reached(n); } int main() { typedef SmartGraph Graph; typedef Graph::Edge Edge; typedef Graph::Node Node; typedef Graph::EdgeIt EdgeIt; typedef Graph::NodeIt NodeIt; typedef Graph::EdgeMap LengthMap; Graph G; Node s, t; LengthMap cap(G); PetStruct ps = addPetersen(G,PET_SIZE); for(int i=0;i dijkstra_test(G, cap); dijkstra_test.run(s); check(dijkstra_test.dist(t)==13,"Dijkstra found a wrong path."); }