Changeset 1385:8db773f19586 in lemon for lemon
- Timestamp:
- 03/22/18 18:56:47 (6 years ago)
- Branch:
- default
- Children:
- 1388:0fdf84c79bc1, 1391:411819b8702c, 1394:2e0c2c25d63e
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/preflow.h
r1270 r1385 477 477 /// flow to the given \c flowMap. The \c flowMap should contain a 478 478 /// flow or at least a preflow, i.e. at each node excluding the 479 /// source node the incoming flow should greater or equal to the479 /// source node the incoming flow should be greater or equal to the 480 480 /// outgoing flow. 481 481 /// \return \c false if the given \c flowMap is not a preflow. … … 496 496 excess -= (*_flow)[e]; 497 497 } 498 if ( excess < 0&& n != _source) return false;498 if (_tolerance.negative(excess) && n != _source) return false; 499 499 (*_excess)[n] = excess; 500 500 } … … 640 640 (*_excess)[n] = excess; 641 641 642 if ( excess != 0) {642 if (_tolerance.nonZero(excess)) { 643 643 if (new_level + 1 < _level->maxLevel()) { 644 644 _level->liftHighestActive(new_level + 1); … … 721 721 (*_excess)[n] = excess; 722 722 723 if ( excess != 0) {723 if (_tolerance.nonZero(excess)) { 724 724 if (new_level + 1 < _level->maxLevel()) { 725 725 _level->liftActiveOn(level, new_level + 1); … … 792 792 if (!reached[n]) { 793 793 _level->dirtyTopButOne(n); 794 } else if ( (*_excess)[n] > 0&& _target != n) {794 } else if (_tolerance.positive((*_excess)[n]) && _target != n) { 795 795 _level->activate(n); 796 796 } … … 853 853 (*_excess)[n] = excess; 854 854 855 if ( excess != 0) {855 if (_tolerance.nonZero(excess)) { 856 856 if (new_level + 1 < _level->maxLevel()) { 857 857 _level->liftHighestActive(new_level + 1);
Note: See TracChangeset
for help on using the changeset viewer.