diff -r 04fdffd38e89 -r 266fa11f222b src/work/alpar/dijkstra/dijkstra.cc --- a/src/work/alpar/dijkstra/dijkstra.cc Sat May 08 16:04:28 2004 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -using namespace hugo; - -int main(int, char **) { - typedef SmartGraph::Node Node; - typedef SmartGraph::NodeIt NodeIt; - typedef SmartGraph::InEdgeIt InEdgeIt; - - SmartGraph G; - Node s, t; - SmartGraph::EdgeMap cap(G); - Timer tim; - std::cout << "DIMACS load ..." << std::endl; - readDimacsMaxFlow(std::cin, G, s, t, cap); - std::cout << " " << tim <, -// FibHeap > -// > dijkstra_test(G, cap); - - Dijkstra , FibHeap > - dijkstra_test(G, cap); - - dijkstra_test.run(s); - //double post_time=currTime(); - - std::cout << "running time with fib_heap: " - // << post_time-pre_time << " sec" - << tim - << std::endl; - - //pre_time=currTime(); - tim.reset(); -// Dijkstra < SmartGraph, -// SmartGraph::EdgeMap, -// BinHeap > > -// dijkstra_test2(G, cap); - - Dijkstra , BinHeap > - dijkstra_test2(G, cap); - - dijkstra_test2.run(s); - //post_time=currTime(); - - std::cout << "running time with bin_heap: " - // << post_time-pre_time << " sec" - << tim - << std::endl; - - - int hiba_fib=0; - int hiba_bin=0; - NodeIt u; - for ( G.first(u) ; G.valid(u); G.next(u) ) { - InEdgeIt e; - for ( G.first(e,u); G.valid(e); G.next(e) ) { - Node v=G.tail(e); - if ( dijkstra_test.dist(u) - dijkstra_test.dist(v) > cap[e] ) - { - std::cout<<"Hibas el a fibonaccis Dijkstraban: " - << dijkstra_test.dist(u) - dijkstra_test.dist(v) - - cap[e]< cap[e] ) - { - std::cout<<"Hibas el a binarisos Dijkstraban: " - << dijkstra_test2.dist(u) - dijkstra_test2.dist(v) - - cap[e]<