COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
04/13/04 22:35:47 (21 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@435
Message:

gw

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/marci/iterator_bfs_demo.cc

    r312 r317  
    169169    cout << "bfs and dfs iterator demo on the reversed directed graph" << endl;
    170170    for(GW::NodeIt n(gw); gw.valid(n); gw.next(n)) {
    171       cout << node_name[n] << ": ";
     171      cout << node_name[GW::Node(n)] << ": ";
    172172      cout << "out edges: ";
    173173      for(GW::OutEdgeIt e(gw, n); gw.valid(e); gw.next(e))
     
    184184    while (!bfs.finished()) {
    185185      //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*/", " <<
    188188          node_name[gw.aNode(bfs)] <<
    189189          (bfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") <<
     
    218218      ++dfs;
    219219      //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*/", " <<
    222222          node_name[gw.aNode(dfs)] <<
    223223          (dfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") <<
     
    237237
    238238  {
    239     //typedef UndirGraphWrapper<const Graph> GW;
    240239    typedef UndirGraphWrapper<const Graph> GW;
    241240    GW gw(G);
     
    245244    cout << "bfs and dfs iterator demo on the undirected graph" << endl;
    246245    for(GW::NodeIt n(gw); gw.valid(n); gw.next(n)) {
    247       cout << node_name[n] << ": ";
     246      cout << node_name[GW::Node(n)] << ": ";
    248247      cout << "out edges: ";
    249248      for(GW::OutEdgeIt e(gw, n); gw.valid(e); gw.next(e))
Note: See TracChangeset for help on using the changeset viewer.