COIN-OR::LEMON - Graph Library

Changeset 1297:c0c2f5c87aa6 in lemon


Ignore:
Timestamp:
10/17/13 09:30:57 (10 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Rename field in min cost flow codes (#478)

Location:
lemon
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • lemon/capacity_scaling.h

    r1296 r1297  
    161161
    162162    // Parameters of the problem
    163     bool _have_lower;
     163    bool _has_lower;
    164164    Value _sum_supply;
    165165
     
    354354    template <typename LowerMap>
    355355    CapacityScaling& lowerMap(const LowerMap& map) {
    356       _have_lower = true;
     356      _has_lower = true;
    357357      for (ArcIt a(_graph); a != INVALID; ++a) {
    358358        _lower[_arc_idf[a]] = map[a];
     
    540540        _cost[j] = _forward[j] ? 1 : -1;
    541541      }
    542       _have_lower = false;
     542      _has_lower = false;
    543543      return *this;
    544544    }
     
    751751      const Value MAX = std::numeric_limits<Value>::max();
    752752      int last_out;
    753       if (_have_lower) {
     753      if (_has_lower) {
    754754        for (int i = 0; i != _root; ++i) {
    755755          last_out = _first_out[i+1];
     
    854854
    855855      // Handle non-zero lower bounds
    856       if (_have_lower) {
     856      if (_has_lower) {
    857857        int limit = _first_out[_root];
    858858        for (int j = 0; j != limit; ++j) {
  • lemon/cost_scaling.h

    r1296 r1297  
    252252
    253253    // Parameters of the problem
    254     bool _have_lower;
     254    bool _has_lower;
    255255    Value _sum_supply;
    256256    int _sup_node_num;
     
    368368    template <typename LowerMap>
    369369    CostScaling& lowerMap(const LowerMap& map) {
    370       _have_lower = true;
     370      _has_lower = true;
    371371      for (ArcIt a(_graph); a != INVALID; ++a) {
    372372        _lower[_arc_idf[a]] = map[a];
     
    563563        _scost[_reverse[j]] = 0;
    564564      }
    565       _have_lower = false;
     565      _has_lower = false;
    566566      return *this;
    567567    }
     
    775775      const Value MAX = std::numeric_limits<Value>::max();
    776776      int last_out;
    777       if (_have_lower) {
     777      if (_has_lower) {
    778778        for (int i = 0; i != _root; ++i) {
    779779          last_out = _first_out[i+1];
     
    832832        sup[n] = _supply[_node_id[n]];
    833833      }
    834       if (_have_lower) {
     834      if (_has_lower) {
    835835        for (ArcIt a(_graph); a != INVALID; ++a) {
    836836          int j = _arc_idf[a];
     
    986986
    987987      // Handle non-zero lower bounds
    988       if (_have_lower) {
     988      if (_has_lower) {
    989989        int limit = _first_out[_root];
    990990        for (int j = 0; j != limit; ++j) {
  • lemon/cycle_canceling.h

    r1296 r1297  
    196196
    197197    // Parameters of the problem
    198     bool _have_lower;
     198    bool _has_lower;
    199199    Value _sum_supply;
    200200
     
    279279    template <typename LowerMap>
    280280    CycleCanceling& lowerMap(const LowerMap& map) {
    281       _have_lower = true;
     281      _has_lower = true;
    282282      for (ArcIt a(_graph); a != INVALID; ++a) {
    283283        _lower[_arc_idf[a]] = map[a];
     
    471471        _cost[_reverse[j]] = 0;
    472472      }
    473       _have_lower = false;
     473      _has_lower = false;
    474474      return *this;
    475475    }
     
    684684      const Value MAX = std::numeric_limits<Value>::max();
    685685      int last_out;
    686       if (_have_lower) {
     686      if (_has_lower) {
    687687        for (int i = 0; i != _root; ++i) {
    688688          last_out = _first_out[i+1];
     
    727727        sup[n] = _supply[_node_id[n]];
    728728      }
    729       if (_have_lower) {
     729      if (_has_lower) {
    730730        for (ArcIt a(_graph); a != INVALID; ++a) {
    731731          int j = _arc_idf[a];
     
    835835
    836836      // Handle non-zero lower bounds
    837       if (_have_lower) {
     837      if (_has_lower) {
    838838        int limit = _first_out[_root];
    839839        for (int j = 0; j != limit; ++j) {
  • lemon/network_simplex.h

    r1296 r1297  
    199199
    200200    // Parameters of the problem
    201     bool _have_lower;
     201    bool _has_lower;
    202202    SupplyType _stype;
    203203    Value _sum_supply;
     
    683683    template <typename LowerMap>
    684684    NetworkSimplex& lowerMap(const LowerMap& map) {
    685       _have_lower = true;
     685      _has_lower = true;
    686686      for (ArcIt a(_graph); a != INVALID; ++a) {
    687687        _lower[_arc_id[a]] = map[a];
     
    880880        _cost[i] = 1;
    881881      }
    882       _have_lower = false;
     882      _has_lower = false;
    883883      _stype = GEQ;
    884884      return *this;
     
    10731073
    10741074      // Remove non-zero lower bounds
    1075       if (_have_lower) {
     1075      if (_has_lower) {
    10761076        for (int i = 0; i != _arc_num; ++i) {
    10771077          Value c = _lower[i];
     
    16131613
    16141614      // Transform the solution and the supply map to the original form
    1615       if (_have_lower) {
     1615      if (_has_lower) {
    16161616        for (int i = 0; i != _arc_num; ++i) {
    16171617          Value c = _lower[i];
Note: See TracChangeset for help on using the changeset viewer.