1.1 --- a/lemon/cost_scaling.h Sat Mar 16 16:20:41 2013 +0100
1.2 +++ b/lemon/cost_scaling.h Thu Oct 17 09:29:37 2013 +0200
1.3 @@ -370,7 +370,6 @@
1.4 _have_lower = true;
1.5 for (ArcIt a(_graph); a != INVALID; ++a) {
1.6 _lower[_arc_idf[a]] = map[a];
1.7 - _lower[_arc_idb[a]] = map[a];
1.8 }
1.9 return *this;
1.10 }
1.11 @@ -902,11 +901,11 @@
1.12 return OPTIMAL;
1.13 }
1.14
1.15 - // Check if the upper bound is greater or equal to the lower bound
1.16 - // on each arc.
1.17 + // Check if the upper bound is greater than or equal to the lower bound
1.18 + // on each forward arc.
1.19 bool checkBoundMaps() {
1.20 for (int j = 0; j != _res_arc_num; ++j) {
1.21 - if (_upper[j] < _lower[j]) return false;
1.22 + if (_forward[j] && _upper[j] < _lower[j]) return false;
1.23 }
1.24 return true;
1.25 }
1.26 @@ -989,7 +988,7 @@
1.27 if (_have_lower) {
1.28 int limit = _first_out[_root];
1.29 for (int j = 0; j != limit; ++j) {
1.30 - if (!_forward[j]) _res_cap[j] += _lower[j];
1.31 + if (_forward[j]) _res_cap[_reverse[j]] += _lower[j];
1.32 }
1.33 }
1.34 }