Changeset 1560:01707a8a4ca6 in lemon-0.x for demo/coloring.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/coloring.cc
r1435 r1560 6 6 #include <lemon/graph_to_eps.h> 7 7 8 #include <fstream> 9 #include <iostream> 10 11 8 12 using namespace std; 9 13 using namespace lemon; 10 14 11 int main() { 15 int main(int argc, char *argv[]) 16 { 17 if(argc<2) 18 { 19 std::cerr << "USAGE: coloring <input_file.lgf>" << std::endl; 20 std::cerr << "The file 'input_file.lgf' has to contain a graph in LEMON format together with a nodemap called 'coords' to draw the graph (e.g. sample.lgf is not such a file)." << std::endl; 21 return 0; 22 } 23 24 25 //input stream to read the graph from 26 std::ifstream is(argv[1]); 27 12 28 typedef UndirSmartGraph Graph; 13 29 typedef Graph::Node Node; … … 18 34 Graph graph; 19 35 20 UndirGraphReader<Graph> reader( std::cin, graph);36 UndirGraphReader<Graph> reader(is, graph); 21 37 Graph::NodeMap<xy<double> > coords(graph); 22 38 reader.readNodeMap("coords", coords);
Note: See TracChangeset
for help on using the changeset viewer.