Class ZigguratNormalizedGaussianSampler

java.lang.Object
org.apache.commons.rng.sampling.distribution.ZigguratNormalizedGaussianSampler
All Implemented Interfaces:
ContinuousSampler, NormalizedGaussianSampler

public class ZigguratNormalizedGaussianSampler
extends java.lang.Object
implements NormalizedGaussianSampler
Marsaglia and Tsang "Ziggurat" method for sampling from a Gaussian distribution with mean 0 and standard deviation 1.

The algorithm is explained in this paper and this implementation has been adapted from the C code provided therein.

Sampling uses:

Since:
1.1
  • Constructor Summary

    Constructors 
    Constructor Description
    ZigguratNormalizedGaussianSampler​(UniformRandomProvider rng)  
  • Method Summary

    Modifier and Type Method Description
    double sample()
    Creates a sample.
    java.lang.String toString()

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait