Commit 72cb613d authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

inference: prevent clabel invalidation in multiflip_mcmc_sweep()

parent 6bffcc02
...@@ -180,12 +180,10 @@ struct MCMC ...@@ -180,12 +180,10 @@ struct MCMC
_state.get_empty_block(v); _state.get_empty_block(v);
auto t = uniform_sample(_state._empty_blocks, rng); auto t = uniform_sample(_state._empty_blocks, rng);
auto r = _state._b[v];
if (_state._coupled_state != nullptr) if (_state._coupled_state != nullptr)
{
auto r = _state._b[v];
_state._coupled_state->sample_branch(t, r, rng); _state._coupled_state->sample_branch(t, r, rng);
_state._bclabel[t] = _state._bclabel[r]; _state._bclabel[t] = _state._bclabel[r];
}
if (t >= _groups.size()) if (t >= _groups.size())
{ {
_groups.resize(t + 1); _groups.resize(t + 1);
......
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