Commit 2307f04b authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

multilevel.hh: fix B_min/B_max enforcement

parent 49e099a1
......@@ -727,7 +727,6 @@ struct Multilevel: public State
if (_verbose)
cout << "staging multilevel, N = " << N << endl;
size_t B_init = rs.size();
size_t B_max = State::_global_moves ? std::min(N, _B_max) : std::min(N, State::_M);
size_t B_min = State::_global_moves ? std::max(size_t(1), _B_min) : 1;
......@@ -735,6 +734,7 @@ struct Multilevel: public State
size_t B_mid;
size_t B_init = rs.size();
size_t B_max_init = B_max;
size_t B_min_init = B_min;
......@@ -1113,7 +1113,8 @@ struct Multilevel: public State
assert(rs.size() == B);
if (B_min > B_init || B_max < B_init)
if (forward && State::_global_moves &&
(B_init < _B_min || B_init > _B_max))
{
S = -numeric_limits<double>::infinity();
lp = 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment