test/bfs_test.cc
changeset 2250 b8fbffd35445
parent 2135 15355b98fb84
child 2260 4274224f8a7d
equal deleted inserted replaced
5:82fa1c565efa 6:677ae44f6be0
    57   d  = bfs_test.distMap();
    57   d  = bfs_test.distMap();
    58   p  = bfs_test.predMap();
    58   p  = bfs_test.predMap();
    59   //  pn = bfs_test.predNodeMap();
    59   //  pn = bfs_test.predNodeMap();
    60   b  = bfs_test.reached(n);
    60   b  = bfs_test.reached(n);
    61 
    61 
    62   DirPath<Graph> pp(G);
    62   Path<Graph> pp(G);
    63   bfs_test.getPath(pp,n);
    63   bfs_test.getPath(pp,n);
    64 }
    64 }
    65 
    65 
    66 void check_Bfs_Function_Compile() 
    66 void check_Bfs_Function_Compile() 
    67 {
    67 {
   107   Bfs<Graph> bfs_test(G);
   107   Bfs<Graph> bfs_test(G);
   108   bfs_test.run(s);
   108   bfs_test.run(s);
   109   
   109   
   110   check(bfs_test.dist(t)==3,"Bfs found a wrong path. " << bfs_test.dist(t));
   110   check(bfs_test.dist(t)==3,"Bfs found a wrong path. " << bfs_test.dist(t));
   111 
   111 
   112   DirPath<Graph> p(G);
   112   Path<Graph> p(G);
   113   check(bfs_test.getPath(p,t),"getPath() failed to set the path.");
   113   check(bfs_test.getPath(p,t),"getPath() failed to set the path.");
   114   check(p.length()==3,"getPath() found a wrong path.");
   114   check(p.length()==3,"getPath() found a wrong path.");
   115   
   115   
   116 
   116 
   117   for(EdgeIt e(G); e==INVALID; ++e) {
   117   for(EdgeIt e(G); e==INVALID; ++e) {