1.1 --- a/src/work/jacint/dijkstra.cc Sat Mar 20 16:10:26 2004 +0000
1.2 +++ b/src/work/jacint/dijkstra.cc Sat Mar 20 16:13:19 2004 +0000
1.3 @@ -25,12 +25,12 @@
1.4 std::cout << "dijkstra demo ..." << std::endl;
1.5
1.6 double pre_time=currTime();
1.7 - Dijkstra<SmartGraph, int, FibHeap<SmartGraph::Node, int,
1.8 + Dijkstra<SmartGraph, int, FibHeap<SmartGraph::Node, int,
1.9 SmartGraph::NodeMap<int> > > dijkstra_test(G, cap);
1.10 - dijkstra_test.run(s);
1.11 + dijkstra_test.run(s);
1.12 double post_time=currTime();
1.13
1.14 - std::cout << "running time with fib_heap: "
1.15 + std::cout << "running time with fib_heap: "
1.16 << post_time-pre_time << " sec"<< std::endl;
1.17
1.18 pre_time=currTime();
1.19 @@ -50,32 +50,32 @@
1.20 InEdgeIt e;
1.21 for ( G.first(e,u); G.valid(e); G.next(e) ) {
1.22 Node v=G.tail(e);
1.23 - if ( dijkstra_test.dist(u) - dijkstra_test.dist(v) > cap.get(e) )
1.24 + if ( dijkstra_test.dist(u) - dijkstra_test.dist(v) > cap[e] )
1.25 {
1.26 std::cout<<"Hibas el a fibonaccis Dijkstraban: "
1.27 << dijkstra_test.dist(u) - dijkstra_test.dist(v) -
1.28 - cap.get(e)<<std::endl;
1.29 + cap[e]<<std::endl;
1.30 ++hiba_fib;
1.31 }
1.32 - if ( dijkstra_test2.dist(u) - dijkstra_test2.dist(v) > cap.get(e) )
1.33 + if ( dijkstra_test2.dist(u) - dijkstra_test2.dist(v) > cap[e] )
1.34 {
1.35 std::cout<<"Hibas el a binarisos Dijkstraban: "
1.36 << dijkstra_test2.dist(u) - dijkstra_test2.dist(v) -
1.37 - cap.get(e)<<std::endl;
1.38 + cap[e]<<std::endl;
1.39 ++hiba_bin;
1.40 }
1.41 if ( e==dijkstra_test.pred(u) &&
1.42 - dijkstra_test.dist(u) - dijkstra_test.dist(v) != cap.get(e) )
1.43 + dijkstra_test.dist(u) - dijkstra_test.dist(v) != cap[e] )
1.44 {
1.45 std::cout<<"Hibas fael a fibonaccis Dijkstraban: "<<
1.46 - dijkstra_test.dist(u) - dijkstra_test.dist(v)- cap.get(e)<<std::endl;
1.47 + dijkstra_test.dist(u) - dijkstra_test.dist(v)- cap[e]<<std::endl;
1.48 ++hiba_fib;
1.49 }
1.50 if ( e==dijkstra_test2.pred(u) &&
1.51 - dijkstra_test2.dist(u) - dijkstra_test2.dist(v) != cap.get(e) )
1.52 + dijkstra_test2.dist(u) - dijkstra_test2.dist(v) != cap[e] )
1.53 {
1.54 std::cout<<"Hibas fael a binarisos Dijkstraban: "<<
1.55 - dijkstra_test2.dist(u) - dijkstra_test2.dist(v)- cap.get(e)<<std::endl;
1.56 + dijkstra_test2.dist(u) - dijkstra_test2.dist(v)- cap[e]<<std::endl;
1.57 ++hiba_bin;
1.58 }
1.59 }