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

    r1179 r1240  
    671671      if (_sum_supply > 0) return INFEASIBLE;
    672672
     673      // Check lower and upper bounds
     674      LEMON_DEBUG(checkBoundMaps(),
     675          "Upper bounds must be greater or equal to the lower bounds");
     676
    673677
    674678      // Initialize vectors
     
    779783
    780784      return OPTIMAL;
     785    }
     786   
     787    // Check if the upper bound is greater or equal to the lower bound
     788    // on each arc.
     789    bool checkBoundMaps() {
     790      for (int j = 0; j != _res_arc_num; ++j) {
     791        if (_upper[j] < _lower[j]) return false;
     792      }
     793      return true;
    781794    }
    782795
Note: See TracChangeset for help on using the changeset viewer.