COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
03/16/13 16:20:41 (11 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Children:
1241:879fcb781086, 1296:330264b171cf
Phase:
public
Message:

Debug checking for capacity bounds in min cost flow algorithms (#454)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/network_simplex.h

    r1166 r1240  
    10681068             (_stype == LEQ && _sum_supply >= 0)) ) return false;
    10691069
     1070      // Check lower and upper bounds
     1071      LEMON_DEBUG(checkBoundMaps(),
     1072          "Upper bounds must be greater or equal to the lower bounds");
     1073
    10701074      // Remove non-zero lower bounds
    10711075      if (_have_lower) {
     
    12311235      return true;
    12321236    }
     1237   
     1238    // Check if the upper bound is greater or equal to the lower bound
     1239    // on each arc.
     1240    bool checkBoundMaps() {
     1241      for (int j = 0; j != _arc_num; ++j) {
     1242        if (_upper[j] < _lower[j]) return false;
     1243      }
     1244      return true;
     1245    }
    12331246
    12341247    // Find the join node
Note: See TracChangeset for help on using the changeset viewer.