COIN-OR::LEMON - Graph Library

source: lemon-0.x/src/work/marci/preflow_demo_leda_uj.cc @ 383:0d5a628cb184

Last change on this file since 383:0d5a628cb184 was 125:7d7dc3fab826, checked in by Mihaly Barasz, 21 years ago

4.4.1-es ledahoz a demo atalakitva

File size: 844 bytes
Line 
1#include <iostream>
2#include <fstream>
3
4#include <LEDA/graph.h>
5#include <LEDA/graph_alg.h>
6#include <LEDA/dimacs.h>
7
8#if defined(LEDA_NAMESPACE)
9using namespace leda;
10#endif
11
12using namespace std;
13
14#include <time_measure.h>
15
16// Use a DIMACS max flow file as stdin.
17// read_dimacs_demo_leda < dimacs_max_flow_file
18int main()
19{
20  GRAPH<int,int> G;
21  leda_node s,t;
22  leda_edge_array<int> cap;
23  Read_Dimacs_MF(cin,G,s,t,cap);
24 
25  leda_edge_array<int> flow(G);
26
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;
35
36  return 0;
37}
Note: See TracBrowser for help on using the repository browser.