| author | klao |
| Thu, 09 Dec 2004 15:30:12 +0000 | |
| changeset 1034 | be6ee857b72d |
| child 1036 | 2f514b5c7122 |
| permissions | -rw-r--r-- |
1 #include <lemon/smart_graph.h>
2 #include <lemon/graph_reader.h>
4 #include <iostream>
5 #include <fstream>
7 using namespace std;
8 using namespace lemon;
10 int main() {
11 ifstream input("test.lgf");
12 SmartGraph graph;
13 GraphReader<SmartGraph> reader(input, graph);
14 SmartGraph::NodeMap<int> cost(graph);
15 reader.readNodeMap("cost", cost);
16 SmartGraph::NodeMap<string> color(graph);
17 reader.readNodeMap("color", color);
18 reader.read();
19 for (SmartGraph::NodeIt it(graph); it != INVALID; ++it) {
20 cout << cost[it] << color[it] << endl;
21 }
22 return 0;
23 }