COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
03/16/13 16:20:41 (12 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/capacity_scaling.h

    r1166 r1240  
    738738      if (_sum_supply > 0) return INFEASIBLE;
    739739
     740      // Check lower and upper bounds
     741      LEMON_DEBUG(checkBoundMaps(),
     742          "Upper bounds must be greater or equal to the lower bounds");
     743
     744
    740745      // Initialize vectors
    741746      for (int i = 0; i != _root; ++i) {
     
    830835
    831836      return OPTIMAL;
     837    }
     838   
     839    // Check if the upper bound is greater or equal to the lower bound
     840    // on each arc.
     841    bool checkBoundMaps() {
     842      for (int j = 0; j != _res_arc_num; ++j) {
     843        if (_upper[j] < _lower[j]) return false;
     844      }
     845      return true;
    832846    }
    833847
Note: See TracChangeset for help on using the changeset viewer.