COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
10/17/13 09:29:37 (6 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Fix debug checking + simplify lower bound handling (#478)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/cycle_canceling.h

    r1240 r1296  
    282282      for (ArcIt a(_graph); a != INVALID; ++a) {
    283283        _lower[_arc_idf[a]] = map[a];
    284         _lower[_arc_idb[a]] = map[a];
    285284      }
    286285      return *this;
     
    785784    }
    786785   
    787     // Check if the upper bound is greater or equal to the lower bound
    788     // on each arc.
     786    // Check if the upper bound is greater than or equal to the lower bound
     787    // on each forward arc.
    789788    bool checkBoundMaps() {
    790789      for (int j = 0; j != _res_arc_num; ++j) {
    791         if (_upper[j] < _lower[j]) return false;
     790        if (_forward[j] && _upper[j] < _lower[j]) return false;
    792791      }
    793792      return true;
     
    839838        int limit = _first_out[_root];
    840839        for (int j = 0; j != limit; ++j) {
    841           if (!_forward[j]) _res_cap[j] += _lower[j];
     840          if (_forward[j]) _res_cap[_reverse[j]] += _lower[j];
    842841        }
    843842      }
Note: See TracChangeset for help on using the changeset viewer.