COIN-OR::LEMON - Graph Library

Changeset 2438:718479989797 in lemon-0.x for lemon


Ignore:
Timestamp:
05/07/07 10:48:40 (17 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3275
Message:

Bug fix in Bfs class.

Patch from Peter Kovacs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/bfs.h

    r2391 r2438  
    542542          _pred->set(m,e);
    543543          _dist->set(m,_curr_dist);
    544           reached = reach || nm[m];
     544          reach = reach || nm[m];
    545545        }
    546546      return n;
     
    606606    {
    607607      bool reach = false;
    608       while ( !emptyQueue() && !reach) processNextNode(dest, reach);
     608      while ( !emptyQueue() && !reach ) processNextNode(dest, reach);
    609609    }
    610610   
     
    624624    {
    625625      bool reach = false;
    626       while ( !emptyQueue() && !reach) processNextNode(nm, reach);
     626      while ( !emptyQueue() && !reach ) processNextNode(nm, reach);
    627627    }
    628628   
     
    665665      addSource(s);
    666666      start(t);
    667       return reached(t)? _curr_dist : 0;
     667      return reached(t) ? _curr_dist : 0;
    668668    }
    669669   
     
    15041504    void start(Node dest) {
    15051505      bool reach = false;
    1506       while (!emptyQueue() && !reach) {
    1507         processNextNode(dest, reach);
    1508       }
     1506      while ( !emptyQueue() && !reach ) processNextNode(dest, reach);
    15091507    }
    15101508   
     
    15221520    void start(const NM &nm) {
    15231521      bool reach = false;
    1524       while (!emptyQueue() && !reach) {
    1525         processNextNode(nm, reach);
    1526       }
     1522      while ( !emptyQueue() && !reach ) processNextNode(nm, reach);
    15271523    }
    15281524
Note: See TracChangeset for help on using the changeset viewer.