equal
deleted
inserted
replaced
|
1 #include <lemon/smart_graph.h> |
|
2 #include <lemon/graph_reader.h> |
|
3 |
|
4 #include <iostream> |
|
5 #include <fstream> |
|
6 |
|
7 using namespace std; |
|
8 using namespace lemon; |
|
9 |
|
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 } |