COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
08/28/07 15:58:54 (17 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3304
Message:

Redesign of augmenting path based matching
Small bug fix in the push-relabel based

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/pr_bipartite_matching.h

    r2463 r2466  
    6060  public:
    6161
     62    /// Constructor
     63
     64    /// Constructor
     65    ///
    6266    PrBipartiteMatching(const Graph &g) :
    6367      _g(g),
     
    196200      }
    197201     
    198       _matching_size = _node_num;
    199       for(ANodeIt n(_g);n!=INVALID;++n)
    200         if(_matching[n]==INVALID) _matching_size--;
    201         else if (_cov[_g.bNode(_matching[n])]>1) {
     202      for(ANodeIt n(_g);n!=INVALID;++n) {
     203        if (_matching[n]==INVALID)continue;
     204        if (_cov[_g.bNode(_matching[n])]>1) {
    202205          _cov[_g.bNode(_matching[n])]--;
    203           _matching_size--;
    204206          _matching[n]=INVALID;
    205         }
     207        } else {
     208          ++_matching_size;
     209        }
     210      }
    206211    }
    207212
     
    262267          return false;
    263268      }
     269      _matching_size = _node_num;
    264270      return true;
    265271    }
Note: See TracChangeset for help on using the changeset viewer.