# HG changeset patch # User Peter Kovacs # Date 1381995057 -7200 # Node ID c0c2f5c87aa648bc03a301c4443797ea80b6b83d # Parent 330264b171cf7ed09fb3117033abddc4d3ebf74d Rename field in min cost flow codes (#478) diff -r 330264b171cf -r c0c2f5c87aa6 lemon/capacity_scaling.h --- a/lemon/capacity_scaling.h Thu Oct 17 09:29:37 2013 +0200 +++ b/lemon/capacity_scaling.h Thu Oct 17 09:30:57 2013 +0200 @@ -160,7 +160,7 @@ int _root; // Parameters of the problem - bool _have_lower; + bool _has_lower; Value _sum_supply; // Data structures for storing the digraph @@ -353,7 +353,7 @@ /// \return (*this) template CapacityScaling& lowerMap(const LowerMap& map) { - _have_lower = true; + _has_lower = true; for (ArcIt a(_graph); a != INVALID; ++a) { _lower[_arc_idf[a]] = map[a]; } @@ -539,7 +539,7 @@ _upper[j] = INF; _cost[j] = _forward[j] ? 1 : -1; } - _have_lower = false; + _has_lower = false; return *this; } @@ -750,7 +750,7 @@ // Remove non-zero lower bounds const Value MAX = std::numeric_limits::max(); int last_out; - if (_have_lower) { + if (_has_lower) { for (int i = 0; i != _root; ++i) { last_out = _first_out[i+1]; for (int j = _first_out[i]; j != last_out; ++j) { @@ -853,7 +853,7 @@ pt = startWithoutScaling(); // Handle non-zero lower bounds - if (_have_lower) { + if (_has_lower) { int limit = _first_out[_root]; for (int j = 0; j != limit; ++j) { if (_forward[j]) _res_cap[_reverse[j]] += _lower[j]; diff -r 330264b171cf -r c0c2f5c87aa6 lemon/cost_scaling.h --- a/lemon/cost_scaling.h Thu Oct 17 09:29:37 2013 +0200 +++ b/lemon/cost_scaling.h Thu Oct 17 09:30:57 2013 +0200 @@ -251,7 +251,7 @@ int _root; // Parameters of the problem - bool _have_lower; + bool _has_lower; Value _sum_supply; int _sup_node_num; @@ -367,7 +367,7 @@ /// \return (*this) template CostScaling& lowerMap(const LowerMap& map) { - _have_lower = true; + _has_lower = true; for (ArcIt a(_graph); a != INVALID; ++a) { _lower[_arc_idf[a]] = map[a]; } @@ -562,7 +562,7 @@ _scost[j] = 0; _scost[_reverse[j]] = 0; } - _have_lower = false; + _has_lower = false; return *this; } @@ -774,7 +774,7 @@ // Remove infinite upper bounds and check negative arcs const Value MAX = std::numeric_limits::max(); int last_out; - if (_have_lower) { + if (_has_lower) { for (int i = 0; i != _root; ++i) { last_out = _first_out[i+1]; for (int j = _first_out[i]; j != last_out; ++j) { @@ -831,7 +831,7 @@ for (NodeIt n(_graph); n != INVALID; ++n) { sup[n] = _supply[_node_id[n]]; } - if (_have_lower) { + if (_has_lower) { for (ArcIt a(_graph); a != INVALID; ++a) { int j = _arc_idf[a]; Value c = _lower[j]; @@ -985,7 +985,7 @@ } // Handle non-zero lower bounds - if (_have_lower) { + if (_has_lower) { int limit = _first_out[_root]; for (int j = 0; j != limit; ++j) { if (_forward[j]) _res_cap[_reverse[j]] += _lower[j]; diff -r 330264b171cf -r c0c2f5c87aa6 lemon/cycle_canceling.h --- a/lemon/cycle_canceling.h Thu Oct 17 09:29:37 2013 +0200 +++ b/lemon/cycle_canceling.h Thu Oct 17 09:30:57 2013 +0200 @@ -195,7 +195,7 @@ int _root; // Parameters of the problem - bool _have_lower; + bool _has_lower; Value _sum_supply; // Data structures for storing the digraph @@ -278,7 +278,7 @@ /// \return (*this) template CycleCanceling& lowerMap(const LowerMap& map) { - _have_lower = true; + _has_lower = true; for (ArcIt a(_graph); a != INVALID; ++a) { _lower[_arc_idf[a]] = map[a]; } @@ -470,7 +470,7 @@ _cost[j] = 0; _cost[_reverse[j]] = 0; } - _have_lower = false; + _has_lower = false; return *this; } @@ -683,7 +683,7 @@ // Remove infinite upper bounds and check negative arcs const Value MAX = std::numeric_limits::max(); int last_out; - if (_have_lower) { + if (_has_lower) { for (int i = 0; i != _root; ++i) { last_out = _first_out[i+1]; for (int j = _first_out[i]; j != last_out; ++j) { @@ -726,7 +726,7 @@ for (NodeIt n(_graph); n != INVALID; ++n) { sup[n] = _supply[_node_id[n]]; } - if (_have_lower) { + if (_has_lower) { for (ArcIt a(_graph); a != INVALID; ++a) { int j = _arc_idf[a]; Value c = _lower[j]; @@ -834,7 +834,7 @@ } // Handle non-zero lower bounds - if (_have_lower) { + if (_has_lower) { int limit = _first_out[_root]; for (int j = 0; j != limit; ++j) { if (_forward[j]) _res_cap[_reverse[j]] += _lower[j]; diff -r 330264b171cf -r c0c2f5c87aa6 lemon/network_simplex.h --- a/lemon/network_simplex.h Thu Oct 17 09:29:37 2013 +0200 +++ b/lemon/network_simplex.h Thu Oct 17 09:30:57 2013 +0200 @@ -198,7 +198,7 @@ int _search_arc_num; // Parameters of the problem - bool _have_lower; + bool _has_lower; SupplyType _stype; Value _sum_supply; @@ -682,7 +682,7 @@ /// \return (*this) template NetworkSimplex& lowerMap(const LowerMap& map) { - _have_lower = true; + _has_lower = true; for (ArcIt a(_graph); a != INVALID; ++a) { _lower[_arc_id[a]] = map[a]; } @@ -879,7 +879,7 @@ _upper[i] = INF; _cost[i] = 1; } - _have_lower = false; + _has_lower = false; _stype = GEQ; return *this; } @@ -1072,7 +1072,7 @@ "Upper bounds must be greater or equal to the lower bounds"); // Remove non-zero lower bounds - if (_have_lower) { + if (_has_lower) { for (int i = 0; i != _arc_num; ++i) { Value c = _lower[i]; if (c >= 0) { @@ -1612,7 +1612,7 @@ } // Transform the solution and the supply map to the original form - if (_have_lower) { + if (_has_lower) { for (int i = 0; i != _arc_num; ++i) { Value c = _lower[i]; if (c != 0) {