equal
deleted
inserted
replaced
97 GW gw(G); |
97 GW gw(G); |
98 |
98 |
99 EdgeNameMap< GW, Graph::NodeMap<string> > edge_name(gw, node_name); |
99 EdgeNameMap< GW, Graph::NodeMap<string> > edge_name(gw, node_name); |
100 |
100 |
101 cout << "bfs and dfs iterator demo on the directed graph" << endl; |
101 cout << "bfs and dfs iterator demo on the directed graph" << endl; |
102 for(GW::NodeIt n=gw.first<GW::NodeIt>(); gw.valid(n); gw.next(n)) { |
102 for(GW::NodeIt n=gw.first<GW::NodeIt>(); |
|
103 gw.valid(n); |
|
104 gw.next(n)) { |
103 cout << node_name.get(n) << ": "; |
105 cout << node_name.get(n) << ": "; |
104 cout << "out edges: "; |
106 cout << "out edges: "; |
105 for(GW::OutEdgeIt e=gw.first<GW::OutEdgeIt>(n); gw.valid(e); gw.next(e)) |
107 for(GW::OutEdgeIt e=gw.first<GW::OutEdgeIt>(n); gw.valid(e); gw.next(e)) |
106 cout << edge_name.get(e) << " "; |
108 cout << edge_name.get(e) << " "; |
107 cout << "in edges: "; |
109 cout << "in edges: "; |