public class SeriesNumerical<N extends java.lang.Number> extends Series<N>
The internal list can be set to be traversed backwards and/or to repeat once its end has been reached.
Constructor and Description |
---|
SeriesNumerical(Model owner,
java.lang.String name,
boolean showInReport,
boolean showInTrace)
Creates a new SeriesNumerical.
|
Modifier and Type | Method and Description |
---|---|
double |
getMean()
Returns the mean value of all samples that have been returned via the
sample() method.
|
double |
getStdDev()
Returns the standard deviation of all the values sampled so far.
|
N |
sample()
Returns the next sample from the value list.
|
TimeSpan |
sampleTimeSpan()
Convenience method to sample a period of random length by creating a
TimeSpan whose length is determined by sampling this
series (time unit is the experiment's reference units),
thus replacing the pattern new TimeSpan(series.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
series (time unit given explicitly as parameter), thus replacing
the pattern new TimeSpan(series.sample(), unit) . |
add, addAll, clearList, createDefaultReporter, getNumberOfAvailableElements, isforward, remove, sampleObject, set, setRepeating, setReverse
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 SeriesNumerical(Model owner, java.lang.String name, boolean showInReport, boolean showInTrace)
owner
- Model : The distribution's ownername
- java.lang.String : The distribution's nameshowInReport
- boolean : Flag for producing reportsshowInTrace
- boolean : Flag for producing trace outputpublic N sample()
public TimeSpan sampleTimeSpan()
TimeSpan
whose length is determined by sampling this
series (time unit is the experiment's reference units),
thus replacing the pattern new TimeSpan(series.sample())
.public TimeSpan sampleTimeSpan(java.util.concurrent.TimeUnit unit)
TimeSpan
whose length is determined by sampling this
series (time unit given explicitly as parameter), thus replacing
the pattern new TimeSpan(series.sample(), unit)
.unit
- TimeUnit: the TimeUnit to assign to the sampled valuepublic double getMean()
public double getStdDev()