loopSW: Function performing the loop in the SW algorithm.

Description Usage Arguments Examples

View source: R/RcppExports.R

Description

Function performing the loop in the SW algorithm.

Usage

1
loopSW(Bds, Cols, ncolors, Nrun, Betas)

Arguments

Bds

matrix of bonds

Cols

Vector of colors.

Nrun

number of runs.

Betas

vector of parameters.

ncolor

number of spins.

Examples

1
2
3
4
5
6
7
8
9
Obs.loc = as.matrix(expand.grid(1:10,1:10))
Bds = getBonds(Obs.loc, NN = 4)
Betas = c(0.8, 0.8, 0.2)
Cols = sample(1:3, 100, replace = TRUE)
par(mfrow = c(1,1))
col = grey.colors(3)
image(matrix(Cols, ncol = 10), col = col)
CS = loopSW(Bds, Cols, 3, 1000, Betas)
image(matrix(CS, ncol = 10), col = col)

ick003/SpTMixture documentation built on May 18, 2019, 2:32 a.m.