Class Knuth1969
java.lang.Object
dev.nm.stat.random.rng.univariate.poisson.Knuth1969
- All Implemented Interfaces:
RandomNumberGenerator
,Seedable
This is a random number generator that generates random deviates according to
the Poisson distribution.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionKnuth1969
(double lambda) Constructs a random number generator to sample from the Poisson distribution.Knuth1969
(double lambda, RandomLongGenerator uniform) Constructs a random number generator to sample from the Poisson distribution. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Get the next randomdouble
.void
seed
(long... seeds) Seed the random number/vector/scenario generator to produce repeatable experiments.
-
Constructor Details
-
Knuth1969
Constructs a random number generator to sample from the Poisson distribution.- Parameters:
lambda
- the shape parameteruniform
- a uniform random number generator
-
Knuth1969
public Knuth1969(double lambda) Constructs a random number generator to sample from the Poisson distribution.- Parameters:
lambda
- the shape parameter
-
-
Method Details
-
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
-