Class ExponentiallyDecayedSum
java.lang.Object
io.deephaven.numerics.movingaverages.ExponentiallyDecayedSum
- All Implemented Interfaces:
Serializable
A sum where the values are decayed at an exponential rate to zero.
- See Also:
-
Constructor Summary
ConstructorDescriptionExponentiallyDecayedSum
(double decayRate, boolean enableTimestepOutOfOrderException) Creates a new exponentially decayed sum. -
Method Summary
Modifier and TypeMethodDescriptionlong
double
getValue()
void
processDouble
(long timestamp, double data) void
reset()
-
Constructor Details
-
ExponentiallyDecayedSum
public ExponentiallyDecayedSum(double decayRate, boolean enableTimestepOutOfOrderException) Creates a new exponentially decayed sum.- Parameters:
decayRate
- rate in milliseconds to decay the sum.enableTimestepOutOfOrderException
- true to allow an exception to be thrown when timesteps are not sequential.
-
-
Method Details
-
processDouble
public void processDouble(long timestamp, double data) -
getValue
public double getValue() -
getLastTimestamp
public long getLastTimestamp() -
reset
public void reset()
-