Warning: this algorithm is O\((k^n)\) and therefore will not scale for \(k^n > 2^{31} - 1\)
exactPotts(neighbors, blocks, k, beta)A matrix of all neighbours in the lattice, one row per pixel.
A list of pixel indices, dividing the lattice into independent blocks.
The number of unique labels.
The inverse temperature parameter of the Potts model.
A list containing the following elements:
expectationThe exact mean of the sufficient statistic.
varianceThe exact variance of the sufficient statistic.
exp_PLPseudo-likelihood (PL) approximation of the expectation of S(z).
var_PLPL approx. of the variance of the sufficient statistic.