Commit 8455d1d4 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

multicanonical_loop.hh: check for out-of-bounds condition

parent 2f50ceaf
......@@ -57,6 +57,9 @@ auto multicanonical_sweep(MulticanonicalState& state, RNG& rng)
int i = get_bin(S);
if (i < 0 || i >= M)
throw ValueException("current state lies outside the allowed entropy range");
for (size_t iter = 0; iter < state._niter; ++iter)
auto v = vertex(uniform_sample(vlist, rng), g);
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