Generic Probability Distribution Algorithms

The fastest generic algorithms for any distributions

Heat Bath and Hasting Methods for Sπn 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 sπns
P(x) = e h.S S → ± 1
Z(2) Discrete Ising sπns S
Blume-Capel model
P(x) = e h.S+D.S2 S → {-S,-S+1,...,S-1,S}
Z(q) Potts sπns
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.π.q/Nq) q→{0,1,...,Nq-1}
O(1) Continuous Ising sπns
P(x) = e h.x.dx x → [-1:1[
O(1) Continuous Ising sπns: Phi4 theory
P(x) = e h.x - x2- λ.(x2-1)2.dx x → [-oo:+oo[
O(2) - U(1) XY sπns
Gauge theory
P(x) = e h.cos(π.x).dx x → [-1:1[
O(3) Heisenberg sπns
P(x) = sin(π.y).e h.cos(π.y).dy
       = eh.x.dx
y → [0:1[
x → [-1:1[
O(3) Heisenberg sπns: Phi4 theory
P(x) = sin(π.z).dx.dz.
          .e h.x.cos(π.z)- x2- λ.(x2-1)2
        = e h.x.y - x2- λ.(x2-1)2.dx.dy.du
x → [-oo:+oo[
y → [-1:1[
z → [-1:1[
O(4)
SU(2)
Sπns system
Gauge theory
P(x) = sin2(π.y).e h.cos(π.y).dy
       = sqrt(1-x2).eh.x.dx
y → [0:1[
x → [-1:1[
O(N>4) Sπns system
P(x) = sinN-2(π.y).e h.cos(π.y).dy
       = (1-x2)(N-3)/2.eh.x.dx
y → [0:1[
x → [-1:1[
Sphere O(N) Sphere P(x) = sinN-2(π.y).dy.sinN-3(π.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(π.y).dy.
                       .sinN-3(π.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(π.y).cosM(π.y).dy
       = (sqrt(1-x2))H-1.xM.dx
y→ [0<yini,yfin<1[
x → [-1<xini:xfin<1[
H=real≥1
M=even integer