#include "wolff/cluster.hpp" #include "wolff/state.hpp" template void wolff(count_t N, state_t & s, std::function gen_R, wolff_measurement& m, std::mt19937& r) { #ifdef FINITE_STATES #ifdef NOFIELD initialize_probs(s.J, s.T); #else initialize_probs(s.J, s.H, s.T); #endif #endif std::uniform_int_distribution dist(0, s.nv); for (count_t steps = 0; steps < N; steps++) { v_t v0 = dist(r); R_t step = gen_R(r, s.spins[v0]); m.pre_cluster(s, steps, N, v0, step); flip_cluster(s, v0, step, r, m); m.post_cluster(s, steps, N); } }