Changeset 1577:15098fb5275c in lemon-0.x for demo/dim_to_dot.cc
- Timestamp:
- 07/20/05 18:05:04 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2078
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
demo/dim_to_dot.cc
r1435 r1577 6 6 // This program can be an aid in making up to date visualized documantation 7 7 // of demo programs. 8 9 // For later documentation (if marci does not do it) 10 // Az a graphviz csomag egy egyszeru formatuma, ami egy graphrajzolo csomag. 11 // Az EdgeSubGraphAdaptor doksijaban szerepel egy kirajzolt graf. Azt nem 12 // kezzel csinaltam, hanem a megfelelo dim file-bol ezzel a progival. A 13 // doxygen ugyanis ilyet eszik, igy a juzer vizualisan is latja a grafot a 14 // doksiban, es sajat maga is le tudja futtatni az algoritmust, mert ott van 15 // a kezeben a dim file is. Es mivel ez egy generalt file, ezert ha vmit 16 // valtoztatunk a dim-en, ezt is konnyu bemasolni. Uff. 17 8 18 9 19 #include <iostream> … … 18 28 using std::endl; 19 29 20 int main() 21 { 30 int main(int argc, char *argv[]) 31 { 32 if(argc<2) 33 { 34 std::cerr << "USAGE: sub_graph_adaptor_demo input_file.dim" << std::endl; 35 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; 36 return 0; 37 } 38 39 40 //input stream to read the graph from 41 std::ifstream is(argv[1]); 42 22 43 typedef SmartGraph Graph; 23 44 … … 32 53 LengthMap length(g); 33 54 34 readDimacs( std::cin, g, length, s, t);55 readDimacs(is, g, length, s, t); 35 56 36 57 cout << "digraph lemon_dot_example {" << endl;
Note: See TracChangeset
for help on using the changeset viewer.