public class ExponentiallyDecayedSum extends Object implements Serializable
A sum where the values are decayed at an exponential rate to zero.
| Constructor and Description |
|---|
ExponentiallyDecayedSum(double decayRate,
boolean enableTimestepOutOfOrderException)
Creates a new exponentially decayed sum.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getLastTimestamp() |
double |
getValue() |
void |
processDouble(long timestamp,
double data) |
void |
reset() |
public ExponentiallyDecayedSum(double decayRate,
boolean enableTimestepOutOfOrderException)
decayRate - rate in milliseconds to decay the sum.enableTimestepOutOfOrderException - true to allow an exception to be thrown when timesteps are not sequential.