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.
|
nextInt
apply, apply, getRandomGenerator, randomDouble
isDensifying
public 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 AbstractContinousDistribution
public double pdf(double x)
pdf
in class AbstractContinousDistribution
public double nextDouble()
nextDouble
in class AbstractDistribution
public final void setRandomGenerator(Random randomGenerator)
setRandomGenerator
in class AbstractDistribution
randomGenerator
- 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–2017 The Apache Software Foundation. All rights reserved.