COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/capacity_scaling.h

    r1221 r1241  
    740740      if (_sum_supply > 0) return INFEASIBLE;
    741741
     742      // Check lower and upper bounds
     743      LEMON_DEBUG(checkBoundMaps(),
     744          "Upper bounds must be greater or equal to the lower bounds");
     745
     746
    742747      // Initialize vectors
    743748      for (int i = 0; i != _root; ++i) {
     
    832837
    833838      return OPTIMAL;
     839    }
     840   
     841    // Check if the upper bound is greater or equal to the lower bound
     842    // on each arc.
     843    bool checkBoundMaps() {
     844      for (int j = 0; j != _res_arc_num; ++j) {
     845        if (_upper[j] < _lower[j]) return false;
     846      }
     847      return true;
    834848    }
    835849
Note: See TracChangeset for help on using the changeset viewer.