Commit 06035ce3 authored by Tiago Peixoto's avatar Tiago Peixoto

mcmc_loop.hh: Shuffle only if sweep is sequential

parent b1430b32
Pipeline #245 failed with stage
in 184 minutes and 7 seconds
......@@ -69,11 +69,15 @@ auto mcmc_sweep(MCMCState state, RNG& rng)
for (size_t iter = 0; iter < state._niter; ++iter)
{
std::shuffle(vlist.begin(), vlist.end(), rng);
if (state._sequential)
std::shuffle(vlist.begin(), vlist.end(), rng);
for (auto v : vlist)
for (size_t vi = 0; vi < vlist.size(); ++vi)
{
if (!state._sequential)
size_t v;
if (state._sequential)
v = vlist[vi];
else
v = uniform_sample(vlist, rng);
if (state.node_weight(v) == 0)
......
Markdown is supported
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