public class MeanStatistic extends Statistic implements Printable, BatchExportable, UnweightedSampleCollector<java.lang.Double>
SampleStatistic, but ignores batches. It therefore does
not calculate confidence intervals. The calculated mean is the true mean over
all samples, independent of the number of values per batch. For simplicity,
only the mean and the number of events is written to the result file.sampleIndex, simNode, traceWriter| Constructor and Description |
|---|
MeanStatistic(SimNode ownNode) |
| Modifier and Type | Method and Description |
|---|---|
void |
computeMeasures(int batchNumber) |
void |
exportBatch(ResultWriter writer)
Exports the batch state to a result writer.
|
long |
getEvents() |
double |
getMean() |
void |
importBatch(ResultReader reader)
Imports the state of a batch from the result reader.
|
void |
printResults(ResultType type,
PrintResultWriter writer) |
void |
resetBatchStatistic()
only between batches
|
void |
resetStatistic()
reset complete statistic
|
void |
update(java.lang.Double value) |
addResultTag, addResultTag, disableTracing, enableTracing, handleInitSimulation, handleStartBatch, handleStartTransientPhase, handleStopBatch, handleStopTransientPhase, printComments, update, writeTraceEntrypublic MeanStatistic(SimNode ownNode)
public void update(java.lang.Double value)
update in interface UnweightedSampleCollector<java.lang.Double>public void printResults(ResultType type, PrintResultWriter writer) throws PrintException
printResults in interface PrintablePrintExceptionpublic void resetStatistic()
StatisticresetStatistic in class Statisticpublic void resetBatchStatistic()
StatisticresetBatchStatistic in class Statisticpublic void computeMeasures(int batchNumber)
computeMeasures in class Statisticpublic void exportBatch(ResultWriter writer) throws PrintException
BatchExportableimportBatch despite the keywords.exportBatch in interface BatchExportablewriter - the result writer which preserves the statePrintException - if any exception occurs while writing a result to the writerpublic void importBatch(ResultReader reader) throws ImportException
BatchExportableexportBatch despite the keywords.importBatch in interface BatchExportablereader - the result reader which contains the batch stateImportException - if any exception occurs while reading a result from the readerpublic double getMean()
public long getEvents()