marci@915: #include marci@915: alpar@921: #include alpar@921: #include marci@915: #include marci@915: marci@915: using std::cout; marci@915: using std::endl; marci@915: alpar@921: using namespace lemon; marci@915: marci@915: int main() { marci@917: typedef SmartGraph Graph1; marci@917: typedef ListGraph Graph2; marci@917: Graph1 g; marci@917: Graph2 h; marci@917: typedef MergeNodeGraphWrapper GW; marci@915: GW gw(g, h); marci@917: Graph1::Node n1=g.addNode(); marci@917: Graph1::Node n2=g.addNode(); marci@917: Graph1::Node n3=g.addNode(); marci@917: Graph2::Node n4=h.addNode(); marci@917: Graph2::Node n5=h.addNode(); marci@915: //GW::NodeIt n(gw) marci@915: for (GW::NodeIt n(gw); n!=INVALID; ++n) { marci@915: cout << gw.id(n) << endl; marci@915: } marci@917: marci@917: GW::NodeMap nm(gw); marci@917: int i=0; marci@917: for (GW::NodeIt n(gw); n!=INVALID; ++n) { marci@917: ++i; marci@917: nm.set(n, i); marci@917: } marci@917: for (Graph1::NodeIt n(g); n!=INVALID; ++n) { marci@917: cout << nm[n] << endl; marci@917: } marci@917: for (Graph2::NodeIt n(h); n!=INVALID; ++n) { marci@917: cout << nm[n] << endl; marci@917: } marci@915: }