graph_wrappers now pass the tests.
4 #include <smart_graph.h>
5 #include <list_graph.h>
8 #include <time_measure.h>
15 int main(int, char **) {
16 typedef SmartGraph::Node Node;
20 SmartGraph::EdgeMap<int> cap(G);
21 readDimacsMaxFlow(std::cin, G, s, t, cap);
23 std::cout << "prim demo ..." << std::endl;
25 double pre_time=currTime();
26 Prim<SmartGraph, int, FibHeap<SmartGraph::Node, int,
27 SmartGraph::NodeMap<int> > > prim_test(G, cap);
29 double post_time=currTime();
31 std::cout << "running time with fib_heap: "
32 << post_time-pre_time << " sec"<< std::endl;
35 Prim<SmartGraph, int, BinHeap<SmartGraph::Node, int,
36 SmartGraph::NodeMap<int> > > prim_test2(G, cap);
40 std::cout << "running time with bin_heap: "
41 << post_time-pre_time << " sec"<< std::endl;
43 std::cout<<"A minimalis feszitofa sulya fib kupaccal: "<< prim_test.weight() <<std::endl;
44 std::cout<<"A minimalis feszitofa sulya bin kupaccal: "<< prim_test2.weight() <<std::endl;
45 if ( prim_test.weight() != prim_test2.weight() )
46 std::cout<<"Nem egyezik meg!"<<std::endl;
47 else std::cout<<"Megegyezik."<<std::endl;