debug
authorjacint
Tue, 27 Apr 2004 18:33:39 +0000
changeset 449c30569f54936
parent 448 510c53fd06cd
child 450 5caac2f7829b
debug
src/test/dijkstra_heap_test.cc
     1.1 --- a/src/test/dijkstra_heap_test.cc	Tue Apr 27 16:27:08 2004 +0000
     1.2 +++ b/src/test/dijkstra_heap_test.cc	Tue Apr 27 18:33:39 2004 +0000
     1.3 @@ -55,7 +55,8 @@
     1.4    int error1=0;
     1.5    int error2=0;
     1.6  
     1.7 -  for(EdgeIt e=G.first(e); G.valid(e); G.next(e)) {
     1.8 +  EdgeIt e;
     1.9 +  for(G.first(e); G.valid(e); G.next(e)) {
    1.10      Node u=G.tail(e);
    1.11      Node v=G.head(e);
    1.12      if ( dijkstra_test.dist(v) - dijkstra_test.dist(u) > cap[e] )
    1.13 @@ -67,7 +68,8 @@
    1.14        }
    1.15    }
    1.16  
    1.17 -  for(NodeIt v=G.first(v); G.valid(v); G.next(v)) {
    1.18 +  NodeIt v;
    1.19 +  for(G.first(v); G.valid(v); G.next(v)) {
    1.20      if ( dijkstra_test.reached(v) ) {
    1.21        Edge e=dijkstra_test.pred(v);
    1.22        Node u=G.tail(e);
    1.23 @@ -88,7 +90,7 @@
    1.24  
    1.25  
    1.26    std::cout <<
    1.27 -    "\n  Testing dijkstra.h with Fibonacci heap implementation fib_heap.h,"
    1.28 +    "\n\n  Testing dijkstra.h with Fibonacci heap implementation fib_heap.h,"
    1.29  	    <<std::endl;
    1.30    std::cout<<"  on a graph with " << 
    1.31      G.nodeNum() << " nodes and " << G.edgeNum() << " edges..."
    1.32 @@ -103,7 +105,7 @@
    1.33    error1=0;
    1.34    error2=0;
    1.35  
    1.36 -  for(EdgeIt e=G.first(e); G.valid(e); G.next(e)) {
    1.37 +  for(G.first(e); G.valid(e); G.next(e)) {
    1.38      Node u=G.tail(e);
    1.39      Node v=G.head(e);
    1.40      if ( dijkstra_test2.dist(v) - dijkstra_test2.dist(u) > cap[e] )
    1.41 @@ -115,7 +117,7 @@
    1.42        }
    1.43    }
    1.44  
    1.45 -  for(NodeIt v=G.first(v); G.valid(v); G.next(v)) {
    1.46 +  for(G.first(v); G.valid(v); G.next(v)) {
    1.47      if ( dijkstra_test2.reached(v) ) {
    1.48        Edge e=dijkstra_test2.pred(v);
    1.49        Node u=G.tail(e);