if (FALSE) {
# A small ferromagnetic network:
P <- 5
W <- matrix(0.5, P, P); diag(W) <- 0
# Low crystal field: ordered (mostly +1 / -1):
X0 <- BlumeCapelSampler(1000, W, thresholds = 0, delta = 0, beta = 1)
# High crystal field: disordered "0" phase (mostly the middle category):
X3 <- BlumeCapelSampler(1000, W, thresholds = 0, delta = 3, beta = 1)
mean(X0 == 0) # low
mean(X3 == 0) # high
}
Run the code above in your browser using DataLab