COIN-OR::LEMON - Graph Library

Changeset 1240:ee9bac10f58e in lemon for lemon/cost_scaling.h


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

    r1165 r1240  
    762762      if (_sum_supply > 0) return INFEASIBLE;
    763763
     764      // Check lower and upper bounds
     765      LEMON_DEBUG(checkBoundMaps(),
     766          "Upper bounds must be greater or equal to the lower bounds");
     767
    764768
    765769      // Initialize vectors
     
    897901
    898902      return OPTIMAL;
     903    }
     904   
     905    // Check if the upper bound is greater or equal to the lower bound
     906    // on each arc.
     907    bool checkBoundMaps() {
     908      for (int j = 0; j != _res_arc_num; ++j) {
     909        if (_upper[j] < _lower[j]) return false;
     910      }
     911      return true;
    899912    }
    900913
Note: See TracChangeset for help on using the changeset viewer.