jacint@173: #include <iostream>
jacint@173: #include <fstream>
jacint@173: 
jacint@220: #include <smart_graph.h>
jacint@211: #include <list_graph.h>
jacint@211: #include <dimacs.h>
jacint@173: #include <prim.h>
jacint@173: #include <time_measure.h>
jacint@173: 
klao@258: #include <bin_heap.h>
jacint@173: #include <fib_heap.h>
jacint@173: 
alpar@921: using namespace lemon;
jacint@173: 
jacint@173: int main(int, char **) {
jacint@220:   typedef SmartGraph::Node Node;
jacint@173: 
jacint@220:   SmartGraph G;
jacint@211:   Node s, t;
jacint@220:   SmartGraph::EdgeMap<int> cap(G);
jacint@173:   readDimacsMaxFlow(std::cin, G, s, t, cap);
jacint@173: 
jacint@173:   std::cout << "prim demo ..." << std::endl;
jacint@173:   
jacint@173:   double pre_time=currTime();
jacint@220:     Prim<SmartGraph, int, FibHeap<SmartGraph::Node, int, 
jacint@220:     SmartGraph::NodeMap<int> > > prim_test(G, cap);
jacint@173:     prim_test.run();
jacint@173:   double post_time=currTime();
jacint@173:     
jacint@173:   std::cout << "running time with fib_heap: " 
jacint@173: 	    << post_time-pre_time << " sec"<< std::endl; 
jacint@173:  
jacint@173:   pre_time=currTime();
jacint@220:   Prim<SmartGraph, int, BinHeap<SmartGraph::Node, int, 
jacint@220:     SmartGraph::NodeMap<int> > > prim_test2(G, cap);
jacint@173:   prim_test2.run();
jacint@173:   post_time=currTime();
jacint@173:   
jacint@173:   std::cout << "running time with bin_heap: " 
jacint@173: 	    << post_time-pre_time << " sec"<< std::endl; 
jacint@173:   
jacint@173:   std::cout<<"A minimalis feszitofa sulya fib kupaccal: "<< prim_test.weight() <<std::endl;
jacint@173:   std::cout<<"A minimalis feszitofa sulya bin kupaccal: "<< prim_test2.weight() <<std::endl;
jacint@173:   if ( prim_test.weight() != prim_test2.weight() ) 
jacint@173:     std::cout<<"Nem egyezik meg!"<<std::endl; 
jacint@173:   else std::cout<<"Megegyezik."<<std::endl; 
jacint@173: 
jacint@173:   return 0;
jacint@173: }