public abstract class ContDist extends NumericalDist<java.lang.Double>
Double
.Constructor and Description |
---|
ContDist(Model owner,
java.lang.String name,
boolean showInReport,
boolean showInTrace)
Constructs a distribution returning continuously distributed double
samples.
|
Modifier and Type | Method and Description |
---|---|
TimeSpan |
sampleTimeSpan()
Convenience method to sample a period of random length by creating a
TimeSpan whose length is determined by sampling this
distribution (time unit is the experiment's reference units),
thus replacing the pattern new TimeSpan(distribution.sample()) . |
TimeSpan |
sampleTimeSpan(java.util.concurrent.TimeUnit unit)
Convenience method to sample a period of random length by creating a
TimeSpan whose length is determined by sampling this
distribution (time unit given explicitly as parameter), thus replacing
the pattern new TimeSpan(distribution.sample(), unit) . |
getInverseOfCumulativeProbabilityFunction, sample, sampleObject
changeRandomGenerator, createDefaultReporter, 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 ContDist(Model owner, java.lang.String name, boolean showInReport, boolean showInTrace)
Double sample()
returning the samples
(inherited from NumericalDist
) has to be
implemented in subclasses.owner
- Model : The distribution's ownername
- java.lang.String : The distribution's nameshowInReport
- boolean : Flag to show distribution in reportshowInTrace
- boolean : Flag to show distribution in tracepublic TimeSpan sampleTimeSpan()
TimeSpan
whose length is determined by sampling this
distribution (time unit is the experiment's reference units),
thus replacing the pattern new TimeSpan(distribution.sample())
.sampleTimeSpan
in class NumericalDist<java.lang.Double>
public TimeSpan sampleTimeSpan(java.util.concurrent.TimeUnit unit)
TimeSpan
whose length is determined by sampling this
distribution (time unit given explicitly as parameter), thus replacing
the pattern new TimeSpan(distribution.sample(), unit)
.sampleTimeSpan
in class NumericalDist<java.lang.Double>
unit
- TimeUnit: the TimeUnit to assign to the sampled value