public class ContDistEmpirical extends ContDist
Constructor and Description |
---|
ContDistEmpirical(Model owner,
java.lang.String name,
boolean showInReport,
boolean showInTrace)
Constructs an empirical distribution pruducing floating point values.
|
Modifier and Type | Method and Description |
---|---|
void |
addEntry(double value,
double frequency)
Adds a new entry of an empirical value and its associated cumulative
frequency.
|
Reporter |
createDefaultReporter()
Creates the default reporter for the RealDistEmpirical 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 . |
boolean |
isInitialized()
Shows if the RealDistEmpirical distribution already is initialized.
|
java.lang.Double |
sample()
Returns the next sample specified by the empirical 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 ContDistEmpirical(Model owner, java.lang.String name, boolean showInReport, boolean showInTrace)
addEntry(long, double)
method to add
values defining the behaviour of the desired distribution.owner
- Model : The distribution's ownername
- java.lang.String : The distribution's nameshowInReport
- boolean : Flag for producing reportsshowInTrace
- boolean : Flag for producing trace outputpublic void addEntry(double value, double frequency)
value
- double : The empirical value observedfrequency
- double : The corresponding cumulative frequency of the
empirical valuepublic Reporter createDefaultReporter()
createDefaultReporter
in class Distribution
ContDistEmpiricalReporter
public boolean isInitialized()
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 1P(X < x) = p