This is the Metropolis-Hastings version of the original Gibbs algorithm
on the Ising model (Chapter 8). Its basic step only proposes changes of values at selected
pixels, avoiding the inefficient updates that do not modify the current value
of x.
Usage
isinghm(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 n x m matrix
of 0's and 1's