src/work/marci/bfs_mm_test.cc
changeset 1050 bcc0766a7b86
parent 959 c80ef5912903
child 1164 80bb73097736
equal deleted inserted replaced
1:f243717ba1da 2:7ddc7e2bb789
    89   
    89   
    90 //   check(bfs_test.dist(t)==3,"Bfs found a wrong path. " << bfs_test.dist(t));
    90 //   check(bfs_test.dist(t)==3,"Bfs found a wrong path. " << bfs_test.dist(t));
    91 
    91 
    92 
    92 
    93 //   for(EdgeIt e(G); e==INVALID; ++e) {
    93 //   for(EdgeIt e(G); e==INVALID; ++e) {
    94 //     Node u=G.tail(e);
    94 //     Node u=G.source(e);
    95 //     Node v=G.head(e);
    95 //     Node v=G.target(e);
    96 //     check( !bfs_test.reached(u) ||
    96 //     check( !bfs_test.reached(u) ||
    97 // 	   (bfs_test.dist(v) > bfs_test.dist(u)+1),
    97 // 	   (bfs_test.dist(v) > bfs_test.dist(u)+1),
    98 // 	   "Wrong output.");
    98 // 	   "Wrong output.");
    99 //   }
    99 //   }
   100 
   100 
   101 //   for(NodeIt v(G); v==INVALID; ++v) {
   101 //   for(NodeIt v(G); v==INVALID; ++v) {
   102 //     check(bfs_test.reached(v),"Each node should be reached.");
   102 //     check(bfs_test.reached(v),"Each node should be reached.");
   103 //     if ( bfs_test.pred(v)!=INVALID ) {
   103 //     if ( bfs_test.pred(v)!=INVALID ) {
   104 //       Edge e=bfs_test.pred(v);
   104 //       Edge e=bfs_test.pred(v);
   105 //       Node u=G.tail(e);
   105 //       Node u=G.source(e);
   106 //       check(u==bfs_test.predNode(v),"Wrong tree.");
   106 //       check(u==bfs_test.predNode(v),"Wrong tree.");
   107 //       check(bfs_test.dist(v) - bfs_test.dist(u) == 1,
   107 //       check(bfs_test.dist(v) - bfs_test.dist(u) == 1,
   108 // 	    "Wrong distance. Difference: " 
   108 // 	    "Wrong distance. Difference: " 
   109 // 	    << std::abs(bfs_test.dist(v) - bfs_test.dist(u) 
   109 // 	    << std::abs(bfs_test.dist(v) - bfs_test.dist(u) 
   110 // 			- 1));
   110 // 			- 1));