Alp?r javaslat?ra k?sz?tettem egy strukt?r?t 2 dimenzi?s vektorok (s?kvektorok) t?rol?s?ra. Olyasmiket tud, amiket s?kvektorokt?l szeretn?nk. A neve: xy, a hasonl? nevu .h file-ban tal?lhat?.
4 #include <LEDA/graph.h>
5 #include <LEDA/graph_alg.h>
6 #include <LEDA/dimacs.h>
8 #if defined(LEDA_NAMESPACE)
14 #include <time_measure.h>
16 // Use a DIMACS max flow file as stdin.
17 // read_dimacs_demo_leda < dimacs_max_flow_file
22 leda_edge_array<int> cap;
23 Read_Dimacs_MF(cin,G,s,t,cap);
25 leda_edge_array<int> flow(G);
27 std::cout << "preflow demo (LEDA)..." << std::endl;
28 double pre_time=currTime();
29 int flow_value = MAX_FLOW(G,s,t,cap,flow);
30 double post_time=currTime();
31 //std::cout << "maximum flow: "<< std::endl;
32 //std::cout<<std::endl;
33 std::cout << "elapsed time: " << post_time-pre_time << " sec"<< std::endl;
34 std::cout << "flow value: "<< flow_value << std::endl;