Compile checks added.
1.1 --- a/src/hugo/dijkstra.h Fri May 07 07:44:44 2004 +0000
1.2 +++ b/src/hugo/dijkstra.h Fri May 07 08:02:17 2004 +0000
1.3 @@ -38,6 +38,7 @@
1.4 ///is using \ref BinHeap "binary heap".
1.5 ///
1.6 ///\author Jacint Szabo
1.7 + ///\todo We need a LengthMap typedef
1.8 #ifdef DOXYGEN
1.9 template <typename Graph,
1.10 typename LengthMap,
2.1 --- a/src/test/dijkstra_test.cc Fri May 07 07:44:44 2004 +0000
2.2 +++ b/src/test/dijkstra_test.cc Fri May 07 08:02:17 2004 +0000
2.3 @@ -6,6 +6,44 @@
2.4
2.5 const int PET_SIZE =5;
2.6
2.7 +
2.8 +void check_Dijkstra_SmartGraph_BinHeap_Compile()
2.9 +{
2.10 + typedef int VType;
2.11 + typedef SmartGraph Graph;
2.12 +
2.13 + typedef Graph::Edge Edge;
2.14 + typedef Graph::Node Node;
2.15 + typedef Graph::EdgeIt EdgeIt;
2.16 + typedef Graph::NodeIt NodeIt;
2.17 + typedef Graph::EdgeMap<VType> LengthMap;
2.18 +
2.19 + typedef Dijkstra<Graph, LengthMap> DType;
2.20 +
2.21 + Graph G;
2.22 + Node n;
2.23 + Edge e;
2.24 + VType l;
2.25 + bool b;
2.26 + DType::DistMap d(G);
2.27 + DType::PredMap p(G);
2.28 + DType::PredNodeMap pn(G);
2.29 + LengthMap cap(G);
2.30 +
2.31 + DType dijkstra_test(G,cap);
2.32 +
2.33 + dijkstra_test.run(n);
2.34 +
2.35 + l = dijkstra_test.dist(n);
2.36 + e = dijkstra_test.pred(n);
2.37 + n = dijkstra_test.predNode(n);
2.38 + d = dijkstra_test.distMap();
2.39 + p = dijkstra_test.predMap();
2.40 + pn = dijkstra_test.predNodeMap();
2.41 + b = dijkstra_test.reached(n);
2.42 +
2.43 +}
2.44 +
2.45 int main()
2.46 {
2.47
2.48 @@ -20,7 +58,6 @@
2.49 Graph G;
2.50 Node s, t;
2.51 LengthMap cap(G);
2.52 -
2.53 PetStruct<Graph> ps = addPetersen(G,PET_SIZE);
2.54
2.55 for(int i=0;i<PET_SIZE;i++) {
2.56 @@ -38,4 +75,3 @@
2.57 check(dijkstra_test.dist(t)==13,"Dijkstra found a wrong path.");
2.58
2.59 }
2.60 -