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.
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 DistNormalTrunc(StreamInterface stream, double min, double max)
stream
- StreamInterface; the numberstreammin
- double; minimum x-value of the distributionmax
- double; maximum x-value of the distributionpublic DistNormalTrunc(StreamInterface stream, double mu, double sigma, double min, double max)
stream
- StreamInterface; the numberstreammu
- double; the mediumsigma
- double; the standard deviationmin
- double; minimum x-value of the distributionmax
- double; maximum x-value of the distributionpublic double draw()
draw
in class DistContinuous
public double getCumulativeProbability(double x)
x
- double; the observation xpublic double getInverseCumulativeProbability(double cumulativeProbability)
cumulativeProbability
- double; reflects cum probpublic double probDensity(double x)
probDensity
in class DistContinuous
public static void main(String[] args)
args
- String[]; argsCopyright © 2014–2019 Delft University of Technology. All rights reserved.