Class Ziggurat2000Exp
- java.lang.Object
-
- dev.nm.stat.random.rng.univariate.exp.Ziggurat2000Exp
-
- All Implemented Interfaces:
RandomExpGenerator,RandomNumberGenerator,Seedable
public class Ziggurat2000Exp extends Object implements RandomExpGenerator
This implements the ziggurat algorithm to sample from the exponential distribution.- See Also:
- "George Marsaglia, Wai Wan Tsang, "The Ziggurat Method for Generating Random Variables," Journal of Statistical Software 5 (8), 2000."
- a C implementation of the Ziggurat algorithm
- another C implementation of the Ziggurat algorithm
-
-
Constructor Summary
Constructors Constructor Description Ziggurat2000Exp()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublenextDouble()Get the next randomdouble.voidseed(long... seeds)Seed the random number/vector/scenario generator to produce repeatable experiments.
-
-
-
Method Detail
-
seed
public void seed(long... seeds)
Description copied from interface:SeedableSeed the random number/vector/scenario generator to produce repeatable experiments.
-
nextDouble
public double nextDouble()
Description copied from interface:RandomNumberGeneratorGet the next randomdouble.- Specified by:
nextDoublein interfaceRandomNumberGenerator- Returns:
- the next random number
-
-