Package deltix.util.vsocket
Class EMA
- java.lang.Object
-
- deltix.util.vsocket.EMA
-
public class EMA extends java.lang.Object
Exponential moving average: EMA(v) = v*(1-k)+ previousEMA*k, where k = e^(-timeSincePreviousMeasurement/decayTime)
-
-
Constructor Summary
Constructors Constructor Description EMA(double decayTimeMillis)
Creates a running EMA instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
double
getAverage()
double
getLastRegisteredValue()
void
register(double value)
void
register(double value, long time)
double
update(double value)
-