Simulation of isotropic Potts model with local interaction by Gibbs sampling. Slightly faster compared to simulPotts_cpp
.
1 | simulPottsFast_cpp(W_i, W_p, W_x, site_order, sample, rho, n, p, iter_nb)
|
W_i |
the 0-based row numbers for each non-zero element in the sparse neighbourhood matrix. integer vector. |
W_p |
the pointers to the initial (zero-based) index of elements in the colum of the sparse neighbourhood matrix. integer vector. |
W_x |
the non-zero elements of the matrix. numeric vector. |
site_order |
a specific order to go all over the sites. An integer vector or a negative number to indicate no specific order. |
sample |
A matrix containing the initial observations (by rows) for the various groups (by columns). |
rho |
A numeric corresponding to the Potts model parameter (i.e. intensity of the neighbourhood correlations). |
n |
The number of observations. integer. |
p |
The number of groups or colors. integer. |
iter_nb |
The maximum number of iteration of the Gibbs sampler. integer. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.