1.1 --- a/src/work/jacint/dijkstra.cc Fri Apr 23 19:41:01 2004 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,57 +0,0 @@
1.4 -#include <iostream>
1.5 -#include <fstream>
1.6 -
1.7 -#include <list_graph.hh>
1.8 -#include <dimacs.hh>
1.9 -#include <dijkstra.h>
1.10 -#include <time_measure.h>
1.11 -#include <bin_heap.hh>
1.12 -
1.13 -using namespace hugo;
1.14 -
1.15 -int main(int, char **) {
1.16 -
1.17 - typedef ListGraph Graph;
1.18 -
1.19 - typedef Graph::Node Node;
1.20 - typedef Graph::EdgeIt EdgeIt;
1.21 -
1.22 - Graph G;
1.23 - Node s, t;
1.24 - Graph::EdgeMap<int> cap(G);
1.25 - readDimacsMaxFlow(std::cin, G, s, t, cap);
1.26 - Timer ts;
1.27 -
1.28 - std::cout << "Testing dijkstra.h with Fibonacci-heap
1.29 -implementation fib_heap.h ..." << std::endl;
1.30 -
1.31 - Dijkstra<Graph, int
1.32 - // , BinHeap<ListGraph::NodeIt, int, ListGraph::NodeMap<int> >
1.33 -> dijkstra_test(G, s, cap);
1.34 - ts.reset();
1.35 - dijkstra_test.run();
1.36 - std::cout << "elapsed time: " << ts << std::endl;
1.37 - double post_time=currTime();
1.38 -
1.39 - std::cout << "running time: " << post_time-pre_time << " sec"<< std::endl;
1.40 -
1.41 - EachEdgeIt e;
1.42 -
1.43 - int hiba=0;
1.44 -
1.45 - int edge=0;
1.46 -
1.47 - for ( G.getFirst(e) ; G.valid(e); G.next(e) ) {
1.48 - NodeIt u=G.tail(e);
1.49 - NodeIt v=G.head(e);
1.50 - ++edge;
1.51 - if ( dijkstra_test.dist(v) - dijkstra_test.dist(u) > cap.get(e) ) {
1.52 - std::cout<<"Hiba: "<<edge<<": "<<dijkstra_test.dist(v) - dijkstra_test.dist(u) - cap.get(e)<<std::endl;
1.53 - ++hiba;
1.54 - }
1.55 - }
1.56 -
1.57 - std::cout << "Osszhibas el: " << hiba << " osszel: " << G.edgeNum() << std::endl;
1.58 -
1.59 - return 0;
1.60 -}