public class DistNormalTrunc extends DistContinuous
This version of the normal distribution uses the numerically approached inverse cumulative distribution.
(c) copyright 2002-2018 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser General Public License (LGPL) , no warranty.
| Modifier and Type | Field and Description |
|---|---|
static double[] |
CUMULATIVE_NORMAL_PROPABILITIES
CUMULATIVE_NORMAL_PROPABILITIES represents the NORMAL DISTRIBUTION FUNCTION TABLE.
|
| Constructor and Description |
|---|
DistNormalTrunc(StreamInterface stream,
double min,
double max)
constructs a normal distribution with mu=0 and sigma=1.
|
DistNormalTrunc(StreamInterface stream,
double mu,
double sigma,
double min,
double max)
constructs a normal distribution with mu and sigma.
|
| Modifier and Type | Method and Description |
|---|---|
double |
draw() |
double |
getCumulativeProbability(double x)
returns the cumulative probability of the x-value.
|
double |
getInverseCumulativeProbability(double cumulativeProbability)
returns the x-value of the given cumulativePropability.
|
static void |
main(String[] args)
Test.
|
double |
probDensity(double x) |
String |
toString() |
public static final double[] CUMULATIVE_NORMAL_PROPABILITIES
public DistNormalTrunc(StreamInterface stream, double min, double max)
stream - the numberstreammin - minimum x-value of the distributionmax - maximum x-value of the distributionpublic DistNormalTrunc(StreamInterface stream, double mu, double sigma, double min, double max)
stream - the numberstreammu - the mediumsigma - the standard deviationmin - minimum x-value of the distributionmax - maximum x-value of the distributionpublic double draw()
draw in class DistContinuouspublic double getCumulativeProbability(double x)
x - the observation xpublic double getInverseCumulativeProbability(double cumulativeProbability)
cumulativeProbability - reflects cum probpublic double probDensity(double x)
probDensity in class DistContinuouspublic static void main(String[] args)
args - argsCopyright © 2014–2018 Delft University of Technology. All rights reserved.