Changeset 317:6e6db1c49bc1 in lemon0.x for src/work/marci/iterator_bfs_demo.cc
 Timestamp:
 04/13/04 22:35:47 (17 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@435
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/work/marci/iterator_bfs_demo.cc
r312 r317 169 169 cout << "bfs and dfs iterator demo on the reversed directed graph" << endl; 170 170 for(GW::NodeIt n(gw); gw.valid(n); gw.next(n)) { 171 cout << node_name[ n] << ": ";171 cout << node_name[GW::Node(n)] << ": "; 172 172 cout << "out edges: "; 173 173 for(GW::OutEdgeIt e(gw, n); gw.valid(e); gw.next(e)) … … 184 184 while (!bfs.finished()) { 185 185 //cout << "edge: "; 186 if (gw.valid( bfs)) {187 cout << edge_name[ bfs] << /*endl*/", " <<186 if (gw.valid(GW::OutEdgeIt(bfs))) { 187 cout << edge_name[GW::OutEdgeIt(bfs)] << /*endl*/", " << 188 188 node_name[gw.aNode(bfs)] << 189 189 (bfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << … … 218 218 ++dfs; 219 219 //cout << "edge: "; 220 if (gw.valid( dfs)) {221 cout << edge_name[ dfs] << /*endl*/", " <<220 if (gw.valid(GW::OutEdgeIt(dfs))) { 221 cout << edge_name[GW::OutEdgeIt(dfs)] << /*endl*/", " << 222 222 node_name[gw.aNode(dfs)] << 223 223 (dfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << … … 237 237 238 238 { 239 //typedef UndirGraphWrapper<const Graph> GW;240 239 typedef UndirGraphWrapper<const Graph> GW; 241 240 GW gw(G); … … 245 244 cout << "bfs and dfs iterator demo on the undirected graph" << endl; 246 245 for(GW::NodeIt n(gw); gw.valid(n); gw.next(n)) { 247 cout << node_name[ n] << ": ";246 cout << node_name[GW::Node(n)] << ": "; 248 247 cout << "out edges: "; 249 248 for(GW::OutEdgeIt e(gw, n); gw.valid(e); gw.next(e))
Note: See TracChangeset
for help on using the changeset viewer.