diff -r ee9bac10f58e -r 330264b171cf lemon/capacity_scaling.h --- a/lemon/capacity_scaling.h Sat Mar 16 16:20:41 2013 +0100 +++ b/lemon/capacity_scaling.h Thu Oct 17 09:29:37 2013 +0200 @@ -356,7 +356,6 @@ _have_lower = true; for (ArcIt a(_graph); a != INVALID; ++a) { _lower[_arc_idf[a]] = map[a]; - _lower[_arc_idb[a]] = map[a]; } return *this; } @@ -836,11 +835,11 @@ return OPTIMAL; } - // Check if the upper bound is greater or equal to the lower bound - // on each arc. + // Check if the upper bound is greater than or equal to the lower bound + // on each forward arc. bool checkBoundMaps() { for (int j = 0; j != _res_arc_num; ++j) { - if (_upper[j] < _lower[j]) return false; + if (_forward[j] && _upper[j] < _lower[j]) return false; } return true; } @@ -857,7 +856,7 @@ if (_have_lower) { int limit = _first_out[_root]; for (int j = 0; j != limit; ++j) { - if (!_forward[j]) _res_cap[j] += _lower[j]; + if (_forward[j]) _res_cap[_reverse[j]] += _lower[j]; } }