public class ContDistNormal extends ContDist
The algorithm used for random number sampling is derived from the Java API
class java.util.Random and modified to also produce antithetic
values if antithetic mode is switched on.
UniformRandomGenerator,
Random| Constructor and Description |
|---|
ContDistNormal(Model owner,
java.lang.String name,
double mean,
double standardDeviation,
boolean showInReport,
boolean showInTrace)
Creates a stream of pseudo random numbers following a symmetric
normal (also known as "Gaussian") distribution.
|
ContDistNormal(Model owner,
java.lang.String name,
double mode,
double standardDeviationLeft,
double standardDeviationRight,
boolean showInReport,
boolean showInTrace)
Creates a stream of pseudo random numbers following an asymmetric normal
distribution subject to different standard deviation values applied left and right
to the mode.
|
| Modifier and Type | Method and Description |
|---|---|
Reporter |
createDefaultReporter()
Creates the default reporter for the ContDistNormal distribution.
|
java.lang.Double |
getInverseOfCumulativeProbabilityFunction(double p)
Abstract method to map a double
p from 0...1 to the
distribution's domain by determining the value x that satisfies
P(X < x) = p. |
double |
getMean()
Returns the mean value of this normal distribution.
|
double |
getMode()
Returns the mode value of this normal distribution.
|
double |
getStdDev()
Returns the standard deviation of this normal distribution.
|
double |
getStdDevLeft()
Returns the left standard deviation of this normal distribution.
|
double |
getStdDevRight()
Returns the right standard deviation of this normal distribution.
|
boolean |
isSymmetric()
Returns whether this distribution is symmetric, i.e. using
the same standard deviation values on each side of the mode
(
true) or not (false). |
java.lang.Double |
sample()
Returns the next normally distributed sample
from this distribution.
|
sampleTimeSpan, sampleTimeSpansampleObjectchangeRandomGenerator, getInitialSeed, getNonNegative, getNumSamples, isAntithetic, reset, reset, setAntithetic, setNonNegative, setSeedgetCorrespondingSchedulable, getDescription, getObservations, getReporter, incrementObservations, incrementObservations, reportIsOn, reportOff, reportOn, resetAt, setCorrespondingSchedulable, setDescription, setReportercurrent, currentEntity, currentEntityAll, currentEvent, currentModel, currentSimProcess, debugIsOn, debugOff, debugOn, getModel, isExperimentCompatible, isModelCompatible, presentTime, sendDebugNote, sendMessage, sendTraceNote, sendWarning, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOngetName, getQuotedName, toStringpublic ContDistNormal(Model owner, java.lang.String name, double mean, double standardDeviation, boolean showInReport, boolean showInTrace)
owner - Model : The distribution's ownername - java.lang.String : The distribution's namemean - double : The mean value of the normal distribution, equal to its modestandardDeviation - double : The standard deviation for this distributionshowInReport - boolean : Flag for producing reportsshowInTrace - boolean : Flag for producing trace outputpublic ContDistNormal(Model owner, java.lang.String name, double mode, double standardDeviationLeft, double standardDeviationRight, boolean showInReport, boolean showInTrace)
getMean.owner - Model : The distribution's ownername - java.lang.String : The distribution's namemode - double : The mode value of the normal distributionstandardDeviationLeft - double : The left standard deviation for this distributionstandardDeviationRight - double : The right standard deviation for this distributionshowInReport - boolean : Flag for producing reportsshowInTrace - boolean : Flag for producing trace outputpublic Reporter createDefaultReporter()
createDefaultReporter in class DistributionContDistNormalReporterpublic double getMean()
getMode().public double getMode()
getMean().public double getStdDev()
public double getStdDevLeft()
getStdDevRight().public double getStdDevRight()
getStdDevLeft().public boolean isSymmetric()
true) or not (false).public java.lang.Double sample()
java.util.Random.nextGaussian() with the feature of
antithetic random numbers added.sample in class NumericalDist<java.lang.Double>public java.lang.Double getInverseOfCumulativeProbabilityFunction(double p)
p from 0...1 to the
distribution's domain by determining the value x that satisfies
P(X < x) = p.getInverseOfCumulativeProbabilityFunction in class NumericalDist<java.lang.Double>p - double: A value between 0 and 1P(X < x) = p