|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.tudelft.simulation.jstats.distributions.Dist
nl.tudelft.simulation.jstats.distributions.DistContinuous
nl.tudelft.simulation.jstats.distributions.DistNormal
public class DistNormal
The Normal distribution. For more information on this distribution see http://mathworld.wolfram.com/NormalDistribution.html
(c) copyright 2002-2004 Delft
University of Technology , the Netherlands.
See for project information
www.simulation.tudelft.nl
License of use: Lesser
General Public License (LGPL) , no warranty.
Field Summary | |
---|---|
static double[] |
CUMULATIVE_NORMAL_PROPABILITIES
CUMULATIVE_NORMAL_PROPABILITIES represents the NORMAL DISTRIBUTION FUNCTION TABLE. |
protected boolean |
haveNextNextGaussian
haveNextNextGaussian is a helper attribute |
protected double |
mu
mu refers to the mean of the normal distribution |
protected double |
sigma
mu refers to the mean of the normal distribution |
Fields inherited from class nl.tudelft.simulation.jstats.distributions.Dist |
---|
stream |
Constructor Summary | |
---|---|
DistNormal(StreamInterface stream)
constructs a normal distribution with mu=0 and sigma=1. |
|
DistNormal(StreamInterface stream,
double mu,
double sigma)
constructs a normal distribution with mu=0 and sigma=1 |
Method Summary | |
---|---|
double |
draw()
draws the next stream value according to the probability of this this distribution. |
double |
getCumulativeProbability(double x)
returns the cumulative probability of the x-value. |
double |
getInverseCumulativeProbability(double cumulativeProbability)
returns the x-value of the given cumulativePropability. |
protected double |
nextGaussian()
Generates the next pseudorandom, Gaussian (normally) distributed double value, with mean 0.0 and standard deviation 1.0 see section 3.4.1 of The Art of Computer Programming, Volume 2 by Donald Knuth. |
double |
probDensity(double x)
returns the propbability density value of an observation |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected double mu
protected double sigma
protected boolean haveNextNextGaussian
public static final double[] CUMULATIVE_NORMAL_PROPABILITIES
Constructor Detail |
---|
public DistNormal(StreamInterface stream)
stream
- the numberstreampublic DistNormal(StreamInterface stream, double mu, double sigma)
stream
- the numberstreammu
- the mediumsigma
- the standard deviationMethod Detail |
---|
public double draw()
DistContinuous
draw
in class DistContinuous
DistContinuous.draw()
public double getCumulativeProbability(double x)
x
- the obsevervation x
public double getInverseCumulativeProbability(double cumulativeProbability)
cumulativeProbability
- reflects cum prob
protected double nextGaussian()
public double probDensity(double x)
DistContinuous
probDensity
in class DistContinuous
x
- the observation.
#probDensity(double)
public String toString()
toString
in class Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |