Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::CA::ca_ising_detail Namespace Reference

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 &current, Neighbor_View< State > neighbours, double J, double H)
 Compute the local energy delta for flipping the centre spin.
 

Function Documentation

◆ delta_energy()

template<typename State >
double Aleph::CA::ca_ising_detail::delta_energy ( const State &  current,
Neighbor_View< State >  neighbours,
double  J,
double  H 
)
inline

◆ spin_to_state()

template<typename State >
State Aleph::CA::ca_ising_detail::spin_to_state ( int  spin)
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().

◆ state_to_spin()

template<typename State >
int Aleph::CA::ca_ising_detail::state_to_spin ( const State &  v)
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()().