Metropolis¶
This is the basic single spin flip Metropolis rule.
-
template<class
Hamiltonian, classLattice>
structMARQOV::Metropolis¶ A class to encapsulate the Metropolis update.
Using the power of partial template class specializations it is possible to define moves peculiar to your model.
- Template Parameters
Hamiltonian: The Hamiltonian used to generate a Metropolis moveLattice: The lattice used for the neighbourhood relations.
Public Static Functions
-
template<class
StateSpace, classRNGType>
intmove(const Hamiltonian &ham, const Lattice &grid, StateSpace &statespace, RNGCache<RNGType> &rng, double beta, int rsite)¶ The actual Metropolis move attempt.
The behaviour of the basic local MARQOV step, how to generate a new state vector from an old one, can be set by the initializers,
- See
initializers.h
- Return
integer, encoding whether the update was accepted or rejected
- Template Parameters
Hamiltonian: the type of the HamiltonianLattice: the type of the latticeStateSpace: the type of the state spaceM: the type of the initializerRNG: the type of the random number generator
- Parameters
ham: the Hamiltoniangrid: the latticestatespace: the statespacerng: the random number generatorbeta: inverse temperaturersite: site to be considered for an update