public class WeightedDistStatistic extends Statistic implements BatchExportable, Printable, WeightedSampleCollector<java.lang.Double,java.lang.Double>
WeightedDistStatistic
provides an implementation for a weighted
distribution statistic.
For printing the results it defines the following keywords:
sampleIndex, simNode, traceWriter
Constructor and Description |
---|
WeightedDistStatistic(int arraySize,
double lowerLimit,
double upperLimit,
SimNode ownNode) |
Modifier and Type | Method and Description |
---|---|
void |
computeMeasures(int batchNumber) |
void |
exportBatch(ResultWriter writer)
Exports the batch state to a result writer.
|
int |
getArraySize() |
double |
getClassWidth() |
double |
getDistribution(int bucketIndex) |
double |
getDistributionConfInterval(int bucketIndex) |
double |
getLowerBound(int bucketIndex) |
double |
getLowerLimit() |
double |
getOverflowConfInterval() |
double |
getOverflowProbability() |
double |
getProbability(int bucketIndex) |
double |
getProbabilityConfInterval(int bucketIndex) |
double |
getUnderflowConfInterval() |
double |
getUnderflowProbability() |
double |
getUpperBound(int bucketIndex) |
double |
getUpperLimit() |
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(double sample) |
void |
update(java.lang.Double sample) |
void |
update(double sample,
double weight) |
void |
update(java.lang.Double sample,
java.lang.Double weight) |
addResultTag, addResultTag, disableTracing, enableTracing, handleInitSimulation, handleStartBatch, handleStartTransientPhase, handleStopBatch, handleStopTransientPhase, printComments, update, writeTraceEntry
public WeightedDistStatistic(int arraySize, double lowerLimit, double upperLimit, SimNode ownNode)
public void printResults(ResultType type, PrintResultWriter writer) throws PrintException
printResults
in interface Printable
PrintException
public void exportBatch(ResultWriter writer) throws PrintException
BatchExportable
importBatch
despite the keywords.exportBatch
in interface BatchExportable
writer
- the result writer which preserves the statePrintException
- if any exception occurs while writing a result to the writerpublic void importBatch(ResultReader reader) throws ImportException
BatchExportable
exportBatch
despite the keywords.importBatch
in interface BatchExportable
reader
- the result reader which contains the batch stateImportException
- if any exception occurs while reading a result from the readerpublic void update(double sample, double weight)
public void update(java.lang.Double sample, java.lang.Double weight)
update
in interface WeightedSampleCollector<java.lang.Double,java.lang.Double>
public final void update(double sample)
public void update(java.lang.Double sample)
update
in interface UnweightedSampleCollector<java.lang.Double>
public void computeMeasures(int batchNumber)
computeMeasures
in class Statistic
public void resetBatchStatistic()
Statistic
resetBatchStatistic
in class Statistic
public void resetStatistic()
Statistic
resetStatistic
in class Statistic
public int getArraySize()
public double getClassWidth()
public double getLowerLimit()
public double getUpperLimit()
public double getLowerBound(int bucketIndex)
public double getUpperBound(int bucketIndex)
public double getUnderflowProbability()
public double getUnderflowConfInterval()
public double getOverflowProbability()
public double getOverflowConfInterval()
public double getProbability(int bucketIndex)
public double getProbabilityConfInterval(int bucketIndex)
public double getDistribution(int bucketIndex)
public double getDistributionConfInterval(int bucketIndex)