public final class InvertedRunningAverage extends Object implements RunningAverage
Constructor and Description |
---|
InvertedRunningAverage(RunningAverage delegate) |
Modifier and Type | Method and Description |
---|---|
void |
addDatum(double datum) |
void |
changeDatum(double delta) |
double |
getAverage() |
int |
getCount() |
RunningAverage |
inverse() |
void |
removeDatum(double datum) |
public InvertedRunningAverage(RunningAverage delegate)
public void addDatum(double datum)
addDatum
in interface RunningAverage
datum
- new item to add to the running averagepublic void removeDatum(double datum)
removeDatum
in interface RunningAverage
datum
- item to remove to the running averagepublic void changeDatum(double delta)
changeDatum
in interface RunningAverage
delta
- amount by which to change a datum in the running averagepublic int getCount()
getCount
in interface RunningAverage
public double getAverage()
getAverage
in interface RunningAverage
public RunningAverage inverse()
inverse
in interface RunningAverage
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.