src/work/iterator_bfs_demo.cc
changeset 242 b255f25ad394
parent 236 ea3de9530ee8
child 265 bf7aea53635a
equal deleted inserted replaced
6:6a1364162148 7:3a32f109930a
   259       cout << "in edges: ";
   259       cout << "in edges: ";
   260       for(GW::InEdgeIt e=gw.first<GW::InEdgeIt>(n); gw.valid(e); gw.next(e)) 
   260       for(GW::InEdgeIt e=gw.first<GW::InEdgeIt>(n); gw.valid(e); gw.next(e)) 
   261 	cout << edge_name.get(e) << " ";
   261 	cout << edge_name.get(e) << " ";
   262       cout << endl;
   262       cout << endl;
   263     }
   263     }
       
   264 //     for(GW::EdgeIt e=gw.first<GW::EdgeIt>(); gw.valid(e); gw.next(e)) { 
       
   265 //       cout << edge_name.get(e) << " ";
       
   266 //     }
       
   267 //     cout << endl;
   264 
   268 
   265     cout << "bfs from t ..." << endl;
   269     cout << "bfs from t ..." << endl;
   266     BfsIterator5< GW, GW::NodeMap<bool> > bfs(gw);
   270     BfsIterator5< GW, GW::NodeMap<bool> > bfs(gw);
   267     bfs.pushAndSetReached(t);
   271     bfs.pushAndSetReached(t);
   268     while (!bfs.finished()) {
   272     while (!bfs.finished()) {