public class JainBoundaryStatistic extends BoundaryStatistic
JainBoundaryStatistic
provides an implementation for for
BoundaryStatistic
with an alternative method (the P2 Algorithm)
to StdBoundaryStatistic
. Note that the percentage-parameter in
the constructor must be between 0 and 1.
A more detailed description of the algorithms can be found in the student
thesis of Luis Lopez (No 1535) or in LDB No 1507:
Raj Jain, Imrich Chlamtac: The P2 algorithm for dynamic
calculation of quantiles and histograms without storing observations,
Communications of the ACM, Vol. 28, Iss. 10, October 1985, pp. 1076 - 1085
Modifier and Type | Field and Description |
---|---|
protected int[] |
actualPos |
protected double[] |
desiredPos |
protected double[] |
height |
protected double[] |
increment |
sampleIndex, simNode, traceWriter
Constructor and Description |
---|
JainBoundaryStatistic(double percentage,
java.lang.String name,
SimNode parentNode) |
Modifier and Type | Method and Description |
---|---|
void |
computeMeasures(int batchNumber) |
int |
getNoOfSamples() |
double |
getPercentage() |
double |
getQuantile() |
void |
resetBatchStatistic()
only between batches
|
void |
resetStatistic()
reset complete statistic
|
void |
update(double sample) |
getResultTypeName, printResults
addResultTag, addResultTag, disableTracing, enableTracing, handleInitSimulation, handleStartBatch, handleStartTransientPhase, handleStopBatch, handleStopTransientPhase, printComments, update, writeTraceEntry
protected double[] height
protected double[] desiredPos
protected int[] actualPos
protected double[] increment
public JainBoundaryStatistic(double percentage, java.lang.String name, SimNode parentNode)
public int getNoOfSamples()
getNoOfSamples
in class BoundaryStatistic
public double getPercentage()
getPercentage
in class BoundaryStatistic
public double getQuantile()
getQuantile
in class BoundaryStatistic
public void update(double sample)
update
in class BoundaryStatistic
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