`template`

<

class GeovalueIterator,

class ForwardIterator,

class Cdf,

class CdfEstimator,

class MarginalCdf,

>

inline int

sequential_cosimulation(

GeovalueIterator begin, GeovalueIterator end,

ForwardIterator first_neigh, ForwardIterator last_neigh,

Cdf& ccdf,

CdfEstimator& estim,

MarginalCdf& marginal

)

`template`

<

class GeovalueIterator,

class ForwardIterator,

class Cdf,

class CdfEstimator,

class MarginalCdf,

class Sampler

>

inline int

sequential_cosimulation(

GeovalueIterator begin, GeovalueIterator end,

ForwardIterator first_neigh, ForwardIterator last_neigh,

Cdf& ccdf,

CdfEstimator& estim,

MarginalCdf& marginal,

Sampler& samp

)

This function performs a sequential simulation of the range of geo-values delimited by iterators `begin` and `end`, accounting for multiple variables. At each location **u** being simulated, the conditional cdf is estimated based on the primary information stored in the first neighborhood `*first_neigh[0]`, and the secondary information contained in the other `nb_of_neighborhoods-1` neighborhoods (`first_neigh` is an array of pointers to `neighborhoods`). If at a given location no neighboring data is found, a new value is drawn from the marginal cumulative distribution: `marginal`.

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`.

Version 2 allows to modify the way a simulated value is drawn from the `ccdf`.

The value returned is the number of problems that occured during the simulation.

- The range [begin,end) is a valid range.
`first_neigh[n]`is a ``pointer'' to the (n+1)-th neighborhood to be accounted for. (n <`nb_of_neighborhoods`).`estim`and`ccdf`do not conflict: if`estim`is designed to estimate Gaussian cdf's,`ccdf`should be a Gaussian cdf.

`GeovalueIterator`is a model of Geo-Value Iterator.`Neighborhood`is a model of Neighborhood.`Cdf`is a model of CDF.`MarginalCdf`is a model of CDF. It can be different from`cdf`.`CdfEstimator`is a model of Cdf Estimator.`Sampler`(in version 2) is a model of Sampler.