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 double
nextDouble()
Get the next randomdouble
.void
seed(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:Seedable
Seed the random number/vector/scenario generator to produce repeatable experiments.
-
nextDouble
public double nextDouble()
Description copied from interface:RandomNumberGenerator
Get the next randomdouble
.- Specified by:
nextDouble
in interfaceRandomNumberGenerator
- Returns:
- the next random number
-
-