Changeset 917:ffb8f0cbcb57 in lemon0.x for src/work/marci/merge_node_graph_wrapper_test.cc
 Timestamp:
 09/28/04 19:00:18 (16 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@1228
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/work/marci/merge_node_graph_wrapper_test.cc
r915 r917 11 11 12 12 int main() { 13 SmartGraph g; 14 ListGraph h; 15 typedef MergeNodeGraphWrapper<SmartGraph, ListGraph> GW; 13 typedef SmartGraph Graph1; 14 typedef ListGraph Graph2; 15 Graph1 g; 16 Graph2 h; 17 typedef MergeNodeGraphWrapper<Graph1, Graph2> GW; 16 18 GW gw(g, h); 17 g.addNode();18 g.addNode();19 g.addNode();20 h.addNode();21 h.addNode();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(); 22 24 //GW::NodeIt n(gw) 23 25 for (GW::NodeIt n(gw); n!=INVALID; ++n) { 24 26 cout << gw.id(n) << endl; 25 27 } 28 29 GW::NodeMap<int> nm(gw); 30 int i=0; 31 for (GW::NodeIt n(gw); n!=INVALID; ++n) { 32 ++i; 33 nm.set(n, i); 34 } 35 for (Graph1::NodeIt n(g); n!=INVALID; ++n) { 36 cout << nm[n] << endl; 37 } 38 for (Graph2::NodeIt n(h); n!=INVALID; ++n) { 39 cout << nm[n] << endl; 40 } 26 41 }
Note: See TracChangeset
for help on using the changeset viewer.