|
numerics
|
Boltzmann acceptance probability helpers for Metropolis MCMC. More...
#include <cmath>#include <vector>Go to the source code of this file.
Namespaces | |
| namespace | num |
| namespace | num::markov |
Functions | |
| double | num::markov::boltzmann_accept (double dE, double beta) noexcept |
| Metropolis acceptance probability min(1, exp(-β ΔE)). | |
| std::vector< double > | num::markov::make_boltzmann_table (const std::vector< double > &dEs, double beta) |
| Precompute a table of acceptance probabilities for a discrete set of dE values. | |
Boltzmann acceptance probability helpers for Metropolis MCMC.
boltzmann_accept(dE, beta) – min(1, exp(-β ΔE)) inline, branch-free exp make_boltzmann_table(dEs, β) – precompute table for a discrete ΔE set
Typical usage (Ising model):
Definition in file boltzmann_table.hpp.