Class Knuth1969
- java.lang.Object
-
- dev.nm.stat.random.rng.univariate.poisson.Knuth1969
-
- All Implemented Interfaces:
RandomNumberGenerator
,Seedable
public class Knuth1969 extends Object implements RandomNumberGenerator
This is a random number generator that generates random deviates according to the Poisson distribution.
-
-
Constructor Summary
Constructors Constructor Description Knuth1969(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
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.
-
-
-
Constructor Detail
-
Knuth1969
public Knuth1969(double lambda, RandomLongGenerator uniform)
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 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
-
-