public class ContDistTriangular extends ContDist
Constructor and Description |
---|
ContDistTriangular(Model owner,
java.lang.String name,
double lower,
double upper,
double peak,
boolean showInReport,
boolean showInTrace)
Creates a stream of pseudo random numbers following a triangular
distribution.
|
Modifier and Type | Method and Description |
---|---|
Reporter |
createDefaultReporter()
Creates the default reporter for the TriangularDist 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 |
getLower()
Returns the minimum value of this triangular distribution.
|
double |
getPeak()
Returns the most likely value of this triangular distribution.
|
double |
getUpper()
Returns the maximum value of this triangular distribution.
|
java.lang.Double |
sample()
Returns the next sample from this distribution.
|
sampleTimeSpan, sampleTimeSpan
sampleObject
changeRandomGenerator, getInitialSeed, getNonNegative, getNumSamples, isAntithetic, reset, reset, setAntithetic, setNonNegative, setSeed
getCorrespondingSchedulable, getDescription, getObservations, getReporter, incrementObservations, incrementObservations, reportIsOn, reportOff, reportOn, resetAt, setCorrespondingSchedulable, setDescription, setReporter
current, currentEntity, currentEntityAll, currentEvent, currentModel, currentSimProcess, debugIsOn, debugOff, debugOn, getModel, isExperimentCompatible, isModelCompatible, presentTime, sendDebugNote, sendMessage, sendTraceNote, sendWarning, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOn
getName, getQuotedName, toString
public ContDistTriangular(Model owner, java.lang.String name, double lower, double upper, double peak, boolean showInReport, boolean showInTrace)
owner
- Model : The distribution's ownername
- java.lang.String : The distribution's namelower
- double : The lowest possibly generated value.upper
- double : The highest possibly generated value.peak
- double : The most probable value within the distribution, the
peak of the triangle.showInReport
- boolean : Flag for producing reportsshowInTrace
- boolean : Flag for producing trace outputpublic Reporter createDefaultReporter()
createDefaultReporter
in class Distribution
ContDistTriangularReporter
public double getLower()
public double getUpper()
public double getPeak()
public java.lang.Double sample()
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 1