public final class BootstrappingDecayingRunningAverage extends java.lang.Object implements RunningAverage, java.lang.Cloneable
| Constructor and Description |
|---|
BootstrappingDecayingRunningAverage(double defaultValue,
double min,
double max,
int maxReports,
SimpleFieldSet fs)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
changeMaxReports(int maxReports)
Change
maxReports. |
BootstrappingDecayingRunningAverage |
clone()
Copy the RunningAverage (create a snapshot).
|
long |
countReports() |
double |
currentValue() |
SimpleFieldSet |
exportFieldSet(boolean shortLived)
Export this object as
SimpleFieldSet. |
void |
report(double d) |
void |
report(long d) |
protected double |
setCurrentValue(double d)
Not a public method. Changes the internally stored
currentValue and return the old one. |
double |
valueIfReported(double d)
Get what currentValue() would be if we reported some given value
|
public BootstrappingDecayingRunningAverage(double defaultValue,
double min,
double max,
int maxReports,
SimpleFieldSet fs)
defaultValue - default valuemin - minimum value of input datamax - maxumum value of input datamaxReports - number of reports before bootstrapping period ends and decay beginsfs - SimpleFieldSet parameter for this object. Will
override other parameters.public final BootstrappingDecayingRunningAverage clone()
RunningAverageclone in interface RunningAverageclone in class java.lang.Objectpublic double currentValue()
currentValue in interface RunningAverageprotected double setCurrentValue(double d)
currentValue and return the old one.
Used by DecayingKeyspaceAverage to normalize the stored averages. Calling this function
may (purposefully) destroy the utility of the average being kept.d - DecayingKeyspaceAveragepublic void report(double d)
report in interface RunningAveraged - public void report(long d)
report in interface RunningAveraged - public double valueIfReported(double d)
valueIfReported in interface RunningAveraged - public void changeMaxReports(int maxReports)
maxReports.maxReports - public long countReports()
countReports in interface RunningAveragepublic SimpleFieldSet exportFieldSet(boolean shortLived)
SimpleFieldSet.shortLived - See SimpleFieldSet.SimpleFieldSet(boolean).