COIN-OR::LEMON - Graph Library

Changeset 1296:330264b171cf in lemon for lemon/cost_scaling.h


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/cost_scaling.h

    r1240 r1296  
    371371      for (ArcIt a(_graph); a != INVALID; ++a) {
    372372        _lower[_arc_idf[a]] = map[a];
    373         _lower[_arc_idb[a]] = map[a];
    374373      }
    375374      return *this;
     
    903902    }
    904903   
    905     // Check if the upper bound is greater or equal to the lower bound
    906     // on each arc.
     904    // Check if the upper bound is greater than or equal to the lower bound
     905    // on each forward arc.
    907906    bool checkBoundMaps() {
    908907      for (int j = 0; j != _res_arc_num; ++j) {
    909         if (_upper[j] < _lower[j]) return false;
     908        if (_forward[j] && _upper[j] < _lower[j]) return false;
    910909      }
    911910      return true;
     
    990989        int limit = _first_out[_root];
    991990        for (int j = 0; j != limit; ++j) {
    992           if (!_forward[j]) _res_cap[j] += _lower[j];
     991          if (_forward[j]) _res_cap[_reverse[j]] += _lower[j];
    993992        }
    994993      }
Note: See TracChangeset for help on using the changeset viewer.