|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Functions | |
| template<typename State > | |
| int | state_to_spin (const State &v) noexcept |
Map any integral state to a spin in {-1, +1}. | |
| template<typename State > | |
| State | spin_to_state (int spin) noexcept |
Inverse of state_to_spin. | |
| template<typename State > | |
| double | delta_energy (const State ¤t, Neighbor_View< State > neighbours, double J, double H) |
| Compute the local energy delta for flipping the centre spin. | |
|
inline |
Compute the local energy delta for flipping the centre spin.
Definition at line 367 of file tpl_ca_stochastic_rules.H.
References Aleph::blossom_maximum_cardinality_matching(), state_to_spin(), and Aleph::sum().
Referenced by Aleph::CA::Ising_Glauber_Rule< Engine >::operator()(), and Aleph::CA::Ising_Metropolis_Rule< Engine >::operator()().
|
inlinenoexcept |
Inverse of state_to_spin.
Signed types receive ±1; unsigned types receive 0 for -1 and 1 for +1.
Definition at line 357 of file tpl_ca_stochastic_rules.H.
References Aleph::blossom_maximum_cardinality_matching().
|
inlinenoexcept |
Map any integral state to a spin in {-1, +1}.
Signed types use the sign of the value (zero is treated as +1); unsigned types treat zero as -1 and any non-zero as +1.
Definition at line 346 of file tpl_ca_stochastic_rules.H.
Referenced by delta_energy(), Aleph::CA::Ising_Glauber_Rule< Engine >::operator()(), and Aleph::CA::Ising_Metropolis_Rule< Engine >::operator()().