COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
10/17/13 09:29:37 (11 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/capacity_scaling.h

    r1240 r1296  
    357357      for (ArcIt a(_graph); a != INVALID; ++a) {
    358358        _lower[_arc_idf[a]] = map[a];
    359         _lower[_arc_idb[a]] = map[a];
    360359      }
    361360      return *this;
     
    837836    }
    838837   
    839     // Check if the upper bound is greater or equal to the lower bound
    840     // on each arc.
     838    // Check if the upper bound is greater than or equal to the lower bound
     839    // on each forward arc.
    841840    bool checkBoundMaps() {
    842841      for (int j = 0; j != _res_arc_num; ++j) {
    843         if (_upper[j] < _lower[j]) return false;
     842        if (_forward[j] && _upper[j] < _lower[j]) return false;
    844843      }
    845844      return true;
     
    858857        int limit = _first_out[_root];
    859858        for (int j = 0; j != limit; ++j) {
    860           if (!_forward[j]) _res_cap[j] += _lower[j];
     859          if (_forward[j]) _res_cap[_reverse[j]] += _lower[j];
    861860        }
    862861      }
Note: See TracChangeset for help on using the changeset viewer.