public class Normal extends AbstractContinousDistribution
| Constructor and Description |
|---|
Normal(double mean,
double standardDeviation,
Random randomGenerator) |
| Modifier and Type | Method and Description |
|---|---|
double |
cdf(double x)
Returns the cumulative distribution function.
|
double |
nextDouble()
Returns a random number from the distribution.
|
double |
pdf(double x)
Returns the probability density function.
|
void |
setRandomGenerator(Random randomGenerator)
Sets the uniform random generator internally used.
|
void |
setState(double mean,
double standardDeviation)
Sets the mean and variance.
|
String |
toString()
Returns a String representation of the receiver.
|
nextIntapply, apply, getRandomGenerator, randomDoubleisDensifyingpublic Normal(double mean,
double standardDeviation,
Random randomGenerator)
mean - The mean of the resulting distribution.standardDeviation - The standard deviation of the distribution.randomGenerator - The random number generator to use. This can be null if you don't
need to generate any numbers.public double cdf(double x)
cdf in class AbstractContinousDistributionpublic double pdf(double x)
pdf in class AbstractContinousDistributionpublic double nextDouble()
nextDouble in class AbstractDistributionpublic final void setRandomGenerator(Random randomGenerator)
setRandomGenerator in class AbstractDistributionrandomGenerator - the new PRNGpublic final void setState(double mean,
double standardDeviation)
mean - The new value for the mean.standardDeviation - The new value for the standard deviation.Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.