contents next up previous
Next: Sequential Simulation, Multiple-Variable Case Up: Algorithms Previous: Multi Linear Combination

Subsections

Sequential Simulation, Single-Variable Case

  1. template
    <
      class GeovalueIterator,
      class Neighborhood,
      class Cdf,
      class CdfEstimator,
      class MarginalCdf
    >
    inline int
    sequential_simulation(
      GeovalueIterator begin, GeovalueIterator end,
      Neighborhood& neighbors,
      Cdf& ccdf,
      CdfEstimator& estim,
      MarginalCdf& marginal
    )


  2. template
    <
      class GeovalueIterator,
      class Neighborhood,
      class Cdf,
      class CdfEstimator,
      class MarginalCdf,
      class Sampler
    >
    inline int 
    sequential_simulation(
      GeovalueIterator begin, GeovalueIterator end,
      Neighborhood& neighbors,
      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. 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.



Where defined

In header file <simulation.h>



Preconditions



Requirements on types



Example

A call to

// ...

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.









































contents next up previous
Next: Sequential Simulation, Multiple-Variable Case Up: Algorithms Previous: Multi Linear Combination
nicolas
2002-05-07