src/test/dijkstra_test.cc
changeset 849 cc3867a7d380
parent 780 e06d0d16595f
child 880 9d0bfd35b97c
equal deleted inserted replaced
6:a433c272ad1a 7:f40d3fe73d60
     1 #include "test_tools.h"
     1 #include "test_tools.h"
     2 #include <hugo/smart_graph.h>
     2 #include <hugo/smart_graph.h>
     3 #include <hugo/dijkstra.h>
     3 #include <hugo/dijkstra.h>
     4 
     4 #include<hugo/skeletons/graph.h>
       
     5 #include<hugo/skeletons/maps.h>
     5 using namespace hugo;
     6 using namespace hugo;
     6 
     7 
     7 const int PET_SIZE =5;
     8 const int PET_SIZE =5;
     8 
     9 
     9 
    10 
    10 void check_Dijkstra_SmartGraph_BinHeap_Compile() 
    11 void check_Dijkstra_BinHeap_Compile() 
    11 {
    12 {
    12   typedef int VType;
    13   typedef int VType;
    13   typedef SmartGraph Graph;
    14   typedef skeleton::StaticGraphSkeleton Graph;
    14 
    15 
    15   typedef Graph::Edge Edge;
    16   typedef Graph::Edge Edge;
    16   typedef Graph::Node Node;
    17   typedef Graph::Node Node;
    17   typedef Graph::EdgeIt EdgeIt;
    18   typedef Graph::EdgeIt EdgeIt;
    18   typedef Graph::NodeIt NodeIt;
    19   typedef Graph::NodeIt NodeIt;
    19   typedef Graph::EdgeMap<VType> LengthMap;
    20   typedef skeleton::ReadMap<Edge,VType> LengthMap;
    20  
    21  
    21   typedef Dijkstra<Graph, LengthMap> DType;
    22   typedef Dijkstra<Graph, LengthMap> DType;
    22   
    23   
    23   Graph G;
    24   Graph G;
    24   Node n;
    25   Node n;
    26   VType l;
    27   VType l;
    27   bool b;
    28   bool b;
    28   DType::DistMap d(G);
    29   DType::DistMap d(G);
    29   DType::PredMap p(G);
    30   DType::PredMap p(G);
    30   DType::PredNodeMap pn(G);
    31   DType::PredNodeMap pn(G);
    31   LengthMap cap(G);
    32   LengthMap cap;
    32 
    33 
    33   DType dijkstra_test(G,cap);
    34   DType dijkstra_test(G,cap);
    34 
    35 
    35   dijkstra_test.run(n);
    36   dijkstra_test.run(n);
    36 
    37