test/dijkstra_test.cc
changeset 2253 1645f6cc9667
parent 2135 15355b98fb84
child 2260 4274224f8a7d
equal deleted inserted replaced
5:62aab5a16593 6:87b05a9500fc
    61   d  = dijkstra_test.distMap();
    61   d  = dijkstra_test.distMap();
    62   p  = dijkstra_test.predMap();
    62   p  = dijkstra_test.predMap();
    63   //  pn = dijkstra_test.predNodeMap();
    63   //  pn = dijkstra_test.predNodeMap();
    64   b  = dijkstra_test.reached(n);
    64   b  = dijkstra_test.reached(n);
    65 
    65 
    66   DirPath<Graph> pp(G);
    66   Path<Graph> pp(G);
    67   dijkstra_test.getPath(pp,n);
    67   dijkstra_test.getPath(pp,n);
    68 }
    68 }
    69 
    69 
    70 void check_Dijkstra_Function_Compile() 
    70 void check_Dijkstra_Function_Compile() 
    71 {
    71 {
   118   dijkstra_test.run(s);
   118   dijkstra_test.run(s);
   119   
   119   
   120   check(dijkstra_test.dist(t)==13,"Dijkstra found a wrong path.");
   120   check(dijkstra_test.dist(t)==13,"Dijkstra found a wrong path.");
   121 
   121 
   122 
   122 
   123   DirPath<Graph> p(G);
   123   Path<Graph> p(G);
   124   check(dijkstra_test.getPath(p,t),"getPath() failed to set the path.");
   124   check(dijkstra_test.getPath(p,t),"getPath() failed to set the path.");
   125   check(p.length()==4,"getPath() found a wrong path.");
   125   check(p.length()==4,"getPath() found a wrong path.");
   126   
   126   
   127 
   127 
   128   for(EdgeIt e(G); e!=INVALID; ++e) {
   128   for(EdgeIt e(G); e!=INVALID; ++e) {