Class NormalRNG
java.lang.Object
dev.nm.stat.random.rng.univariate.normal.NormalRNG
- All Implemented Interfaces:
RandomNumberGenerator
,Seedable
This is a random number generator that generates random deviates according to the Normal
distribution.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNormalRNG
(double mean, double sigma) Construct a random number generator to sample from the Normal distribution.NormalRNG
(double mean, double sigma, RandomStandardNormalGenerator rnorm) Construct a random number generator to sample from the Normal 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
-
NormalRNG
Construct a random number generator to sample from the Normal distribution.- Parameters:
mean
- the meansigma
- the standard deviationrnorm
- a standard random normal number generator
-
NormalRNG
public NormalRNG(double mean, double sigma) Construct a random number generator to sample from the Normal distribution.- Parameters:
mean
- the meansigma
- the standard deviation
-
-
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
-