public abstract class BoundaryStatistic extends Statistic implements Printable
BoundaryStatistic
is an abstract base class derived from
Statistic
. It is the base class of
StdBoundaryStatistic
and
JainBoundaryStatistic
. These two
classes are used to find the quantile for a given percentage. The class
StdBoundaryStatistic
provides an
implementation to calculate quantiles for a given number of samples and
percentage. The class
JainBoundaryStatistic
does the same
with an alternative method, the P2 algorithm described in
"R. JAIN, I. CHLAMTAC: "The P**2 algorithm for dynamic calculation of
quantiles and histograms without storing observations." Communications of the
ACM, Vol. 28, Oct. 1985, pp. 1076-1085.". Thus, for constructor call,
StdBoundaryStatistic
requires
additionally to the percentage (e.g., 0.95) also the expected number of
samples. getQuantile()
returns the value of the quantile.
getPercentage()
returns the value of the input percentage.
getNoOfSamples()
returns the number of all collected samples.
Boundary statistics can't be used with batch parallelization.
Following keywords are defined for printing the results:
MedianStatistic
has been
implemented to measure medians.
MaxBufferSize
of 10-20% results a deviation to the accurate
value about 0.01%.sampleIndex, simNode, traceWriter
Constructor and Description |
---|
BoundaryStatistic(SimNode ownNode) |
Modifier and Type | Method and Description |
---|---|
abstract int |
getNoOfSamples() |
abstract double |
getPercentage() |
abstract double |
getQuantile() |
java.lang.String |
getResultTypeName() |
void |
printResults(ResultType type,
PrintResultWriter writer) |
abstract void |
update(double sample) |
addResultTag, addResultTag, computeMeasures, disableTracing, enableTracing, handleInitSimulation, handleStartBatch, handleStartTransientPhase, handleStopBatch, handleStopTransientPhase, printComments, resetBatchStatistic, resetStatistic, update, writeTraceEntry
public BoundaryStatistic(SimNode ownNode)
public void printResults(ResultType type, PrintResultWriter writer)
printResults
in interface Printable
public java.lang.String getResultTypeName()
getResultTypeName
in interface Printable
public abstract void update(double sample)
public abstract double getQuantile()
public abstract double getPercentage()
public abstract int getNoOfSamples()