public class NormalRandomVariable extends AbstractContinuousRandomVariable
A random variable generator for the Normal distribution.
References:
Constructor and Description |
---|
NormalRandomVariable()
Default constructor.
|
NormalRandomVariable(double m,
double s)
Create a random variable with the given mean and standard deviation.
|
NormalRandomVariable(double m,
double s,
RNG source)
Create a random variable with the given parameters.
|
Modifier and Type | Method and Description |
---|---|
double |
nextRandomVariable()
Access the next random variable from this generator.
|
static double |
nextRandomVariable(double m,
double s,
RNG source)
Access the next random variable using the given generator.
|
public NormalRandomVariable()
public NormalRandomVariable(double m, double s)
m
- the mean.s
- the standard deviation.public NormalRandomVariable(double m, double s, RNG source)
m
- the mean.s
- the standard deviation.source
- the source generator.public static double nextRandomVariable(double m, double s, RNG source)
Access the next random variable using the given generator.
The implementation of this method is based on the Normal generator of Marsaglia and Bray.
m
- the mean.s
- the standard deviation.source
- the source generator.public double nextRandomVariable()
Jas4pp 1.5 © Java Analysis Studio for Particle Physics