Changeset 2466:feb7974cf4ec in lemon-0.x for lemon/pr_bipartite_matching.h
- Timestamp:
- 08/28/07 15:58:54 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3304
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/pr_bipartite_matching.h
r2463 r2466 60 60 public: 61 61 62 /// Constructor 63 64 /// Constructor 65 /// 62 66 PrBipartiteMatching(const Graph &g) : 63 67 _g(g), … … 196 200 } 197 201 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) { 202 205 _cov[_g.bNode(_matching[n])]--; 203 _matching_size--;204 206 _matching[n]=INVALID; 205 } 207 } else { 208 ++_matching_size; 209 } 210 } 206 211 } 207 212 … … 262 267 return false; 263 268 } 269 _matching_size = _node_num; 264 270 return true; 265 271 }
Note: See TracChangeset
for help on using the changeset viewer.