Skip to content

num::markov::metropolis_sweep

Defined in header <stochastic/detail/mcmc_impl.hpp>

template <energy_difference DeltaE, std::invocable<idx> Apply,
          std::uniform_random_bit_generator RNG>
metropolis_stats metropolis_sweep(idx n_sites, DeltaE delta_energy, Apply apply_flip,
                                  real beta, RNG &rng);

Make one Metropolis sweep of n_sites updates, each accepted with probability \(\min(1, e^{-\beta \Delta E})\). delta_energy(i) returns \(\Delta E\); apply(i) makes the move.