COIN-OR::LEMON - Graph Library

Changeset 1102:330264b171cf in lemon-main


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)

Location:
lemon
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • lemon/capacity_scaling.h

    r1070 r1102  
    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      }
  • lemon/cost_scaling.h

    r1070 r1102  
    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      }
  • lemon/cycle_canceling.h

    r1070 r1102  
    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      }
  • lemon/network_simplex.h

    r1070 r1102  
    12361236    }
    12371237   
    1238     // Check if the upper bound is greater or equal to the lower bound
     1238    // Check if the upper bound is greater than or equal to the lower bound
    12391239    // on each arc.
    12401240    bool checkBoundMaps() {
Note: See TracChangeset for help on using the changeset viewer.