This is the original Geman and Geman (1984) Gibbs sampler
on the Ising model that gave its name to the method. It simulates
an $n*m$ grid from the Ising distribution.
Usage
isingibbs(niter, n, m=n, beta)
Arguments
niter
number of iterations of the algorithm
n
number of rows in the grid
m
number of columns in the grid
beta
Ising parameter
Value
x, a realisation from the Ising distribution
as a matrix of size n x m
References
Geman, S. and Geman, D. (1984)
Stochastic relaxation, Gibbs distributions and the Bayesian restoration of
images. IEEE Trans. Pattern Anal. Mach. Intell., 6, 721--741.