This function performs a sequential simulation of the range of geo-values delimited by iterators begin and end. At each location u being simulated, the neighborhood of u is retrieved and stored into neighborhood neighbors. If no neighbor is found, a new value is simulated from the marginal cumulative distribution marginal. Otherwise estim estimates a conditional cdf which is stored into ccdf and a new value is simulated by sampler.
In version 1, a new value is simulated using Monte-Carlo simulation: a probability is determined randomly and used to draw a realization from conditional cdf ccdf. The random number generator is initialized by a default (constant) value. If control over the random number generator is needed, version 2 of the algorithm should be used.
Version 2 allows to specify a way to sampler from ccdf.
The value returned is the number of problems that occured during the simulation.
// ...
location2d u(0,0);
geo_value2d Z(u,-99);
sequential_simulate(&Z, &Z+1,
neighbors, gauss_cdf,
gauss_cdf_estim);
//...
would simulate the single geo-value Z.