Changeset 1560:01707a8a4ca6 in lemon-0.x for demo/sub_graph_adaptor_demo.cc
- Timestamp:
- 07/15/05 18:01:55 (19 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2058
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
demo/sub_graph_adaptor_demo.cc
r1544 r1560 1 1 // -*- c++ -*- 2 2 3 // Use a DIMACS max flow file as stdin.3 // Use a DIMACS max flow file as input. 4 4 // sub_graph_adaptor_demo < dimacs_max_flow_file 5 5 // This program computes a maximum number of edge-disjoint shortest paths … … 22 22 using std::endl; 23 23 24 int main() 25 { 24 int main(int argc, char *argv[]) 25 { 26 if(argc<2) 27 { 28 std::cerr << "USAGE: sub_graph_adaptor_demo <input_file.dim>" << std::endl; 29 std::cerr << "The file 'input_file.dim' has to contain a max flow instance in DIMACS format (e.g. sub_graph_adaptor_demo.dim is such a file)." << std::endl; 30 return 0; 31 } 32 33 34 //input stream to read the graph from 35 std::ifstream is(argv[1]); 36 26 37 typedef SmartGraph Graph; 27 38 … … 36 47 LengthMap length(g); 37 48 38 readDimacs( std::cin, g, length, s, t);49 readDimacs(is, g, length, s, t); 39 50 40 51 cout << "edges with lengths (of form id, source--length->target): " << endl;
Note: See TracChangeset
for help on using the changeset viewer.