|
Data.Random.Distribution.Ziggurat |
|
|
|
Synopsis |
|
|
|
Documentation |
|
|
Constructors | | Instances | |
|
|
mkZigguratRec |
|
|
Build the tables to implement the ziggurat algorithm devised by
Marsaglia & Tang, attempting to automatically compute the R and V
values.
Arguments are the same as for |mkZigguratRec|, with an additional
argument for the tail distribution as a function of the selected
R value.
|
|
|
Build the tables to implement the ziggurat algorithm devised by
Marsaglia & Tang, attempting to automatically compute the R and V
values.
Arguments:
- flag indicating whether to mirror the distribution
* the (one-sided antitone) CDF
* the inverse of the CDF
* the number of bins
* R, the x value of the first bin
* V, the volume of each bin
* an RVar providing a random tuple consisting of:
- a bin index, uniform over [0,c) :: Int
- a uniformly distributed fractional value, from -1 to 1 if not mirrored, from 0 to 1 otherwise.
* an RVar sampling from the tail (the region where x > R)
|
|
findBin0 |
|
|
|
Produced by Haddock version 2.4.2 |