Changeset 2541:e67ec65747fa in lemon-0.x for lemon/circulation.h
- Timestamp:
- 12/12/07 14:35:55 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3418
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/circulation.h
r2533 r2541 404 404 } 405 405 406 typename Graph::template NodeMap<bool> reached(_g, false);407 408 409 406 // global relabeling tested, but in general case it provides 410 407 // worse performance for random graphs … … 437 434 } else if (_tol.positive((*_excess)[_g.target(e)] + (*_lo)[e])) { 438 435 _flow->set(e, (*_lo)[e]); 439 _excess->set(_g.target(e), (*_excess)[_g.target(e)] + (*_ up)[e]);440 _excess->set(_g.source(e), (*_excess)[_g.source(e)] - (*_ up)[e]);436 _excess->set(_g.target(e), (*_excess)[_g.target(e)] + (*_lo)[e]); 437 _excess->set(_g.source(e), (*_excess)[_g.source(e)] - (*_lo)[e]); 441 438 } else { 442 439 Value fc = -(*_excess)[_g.target(e)]; … … 472 469 int mlevel=_node_num; 473 470 Value exc=(*_excess)[act]; 474 471 475 472 for(OutEdgeIt e(_g,act);e!=INVALID; ++e) { 476 473 Node v = _g.target(e); … … 489 486 else { 490 487 _flow->set(e, (*_up)[e]); 491 _excess->set(v, (*_excess)[v] + exc);488 _excess->set(v, (*_excess)[v] + fc); 492 489 if(!_level->active(v) && _tol.positive((*_excess)[v])) 493 490 _level->activate(v);
Note: See TracChangeset
for help on using the changeset viewer.