3 #include <lemon/list_graph.h>
4 #include <lemon/smart_graph.h>
5 #include <merge_node_graph_wrapper.h>
10 using namespace lemon;
13 typedef SmartGraph Graph1;
14 typedef ListGraph Graph2;
17 typedef MergeNodeGraphWrapper<Graph1, Graph2> GW;
19 Graph1::Node n1=g.addNode();
20 Graph1::Node n2=g.addNode();
21 Graph1::Node n3=g.addNode();
22 Graph2::Node n4=h.addNode();
23 Graph2::Node n5=h.addNode();
25 for (GW::NodeIt n(gw); n!=INVALID; ++n) {
26 cout << gw.id(n) << endl;
29 GW::NodeMap<int> nm(gw);
31 for (GW::NodeIt n(gw); n!=INVALID; ++n) {
35 for (Graph1::NodeIt n(g); n!=INVALID; ++n) {
36 cout << nm[n] << endl;
38 for (Graph2::NodeIt n(h); n!=INVALID; ++n) {
39 cout << nm[n] << endl;