Generic Probability Distribution Algorithms

The fastest generic algorithms for any distributions

Heat Bath and Hasting Methods for Spin Systems

Random numbers from the following distributions are calculated using various Heath Bath and Hasting's methods, including the Fast Linear Algorithm (FLA) and the Alias Walker-Hasting (AWH).

 Symmetry Physical systems Probability Range Z(2) Discrete ±1 Ising spins P(x) = e h.S S → ± 1 Z(2) Discrete Ising spins S Blume-Capel model P(x) = e h.S+D.S2 S → {-S,-S+1,...,S-1,S} Z(q) Potts spins P(x) = e h1.S1+h2.S2+h3.S3+... Sq→ {0,1,...,Nq-1} Z(q) → O(2) Clock model P(x) = e h.cos(2.PI.q/Nq) q→{0,1,...,Nq-1} O(1) Continuous Ising spins P(x) = e h.x.dx x → [-1:1[ O(1) Continuous Ising spins: Phi4 theory P(x) = e h.x - x2- landa.(x2-1)2.dx x → [-oo:+oo[ O(2) - U(1) XY spins Gauge theory P(x) = e h.cos(Pi.x).dx x → [-1:1[ O(3) Heisenberg spins P(x) = sin(Pi.y).e h.cos(Pi.y).dy        = eh.x.dx y → [0:1[ x → [-1:1[ O(3) Heisenberg spins: Phi4 theory P(x) = sin(Pi.z).dx.dz.           .e h.x.cos(Pi.z)- x2- landa.(x2-1)2         = e h.x.y - x2- landa.(x2-1)2.dx.dy.du x → [-oo:+oo[ y → [-1:1[ z → [-1:1[ O(4) SU(2) Spins system Gauge theory P(x) = sin2(Pi.y).e h.cos(Pi.y).dy        = sqrt(1-x2).eh.x.dx y → [0:1[ x → [-1:1[ O(N>4) Spins system P(x) = sinN-2(Pi.y).e h.cos(Pi.y).dy        = (1-x2)(N-3)/2.eh.x.dx y → [0:1[ x → [-1:1[ Sphere O(N) Sphere P(x) = sinN-2(Pi.y).dy.sinN-3(Pi.z).dz...        = (1-x2)(N-3)/2.dx... y → [0:1[ x → [-1:1[ Ball O(N) Ball P(r,x) = rN-1.dr.sinN-2(Pi.y).dy.                        .sinN-3(Pi.z).dz...          = rN-1.dr.(1-x2)(N-3)/2.dx... r → [0:1[ y → [0:1[ x → [-1:1[ Sin_Cos P(x) = sinH(Pi.y).cosM(Pi.y).dy        = (sqrt(1-x2))H-1.xM.dx y→ [0