- All Implemented Interfaces:
Pdf, PdfCont
public class PdfContGaussianZiggurat
extends Object
implements PdfCont
This routine is based on the following article, with a couple of
modifications which simplify the implementation.
George Marsaglia, Wai Wan Tsang
The Ziggurat Method for Generating Random Variables
Journal of Statistical Software, vol. 5 (2000), no. 8
http://www.jstatsoft.org/v05/i08/
The modifications are:
1) use 128 steps instead of 256 to decrease the amount of static
data necessary.
2) use an acceptance sampling from an exponential wedge
exp(-R*(x-R/2)) for the tail of the base strip to simplify the
implementation. The area of exponential wedge is used in
calculating 'v' and the coefficients in ziggurat table, so the
coefficients differ slightly from those in the Marsaglia and Tsang
paper.
See also Leong et al, "A Comment on the Implementation of the
Ziggurat Method", Journal of Statistical Software, vol 5 (2005), no 7.
- Author:
- osborn