public class NormalRNG extends Object implements RandomNumberGenerator
sigma is a standard deviation, not a variance; supply a finite
positive value. Each draw transforms a standard-normal draw to
mean + sigma * z. The two-argument constructor uses the shared
RNGUtils.RNORM generator. Its seeding and draws affect other users
of that shared generator. Pass a separate
Ziggurat2000 through the
three-argument constructor when isolated generator state is required.
| Constructor and Description |
|---|
NormalRNG(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.
|
| Modifier and Type | Method and Description |
|---|---|
double |
nextDouble()
Get the next random
double. |
void |
seed(long... seeds)
Seed the random number/vector/scenario generator to produce repeatable experiments.
|
public NormalRNG(double mean,
double sigma,
RandomStandardNormalGenerator rnorm)
mean - the meansigma - the standard deviationrnorm - a standard random normal number generatorpublic NormalRNG(double mean,
double sigma)
mean - the meansigma - the standard deviationpublic void seed(long... seeds)
Seedablepublic double nextDouble()
RandomNumberGeneratordouble.nextDouble in interface RandomNumberGeneratorCopyright © 2010-2026 NM Group. All Rights Reserved.