Class EmaArray

java.lang.Object
io.deephaven.numerics.movingaverages.EmaArray
All Implemented Interfaces:
Serializable

public class EmaArray extends Object implements Serializable
An array of EMAs with different timescales.
See Also:
  • Constructor Details

    • EmaArray

      public EmaArray(AbstractMa.Type type, AbstractMa.Mode mode, double[] timeScales)
      Constructs a new array of EMAs which use the given timescales.
      Parameters:
      type - type of EMA
      mode - compute the ema by tick or time
      timeScales - timescales for the EMAs.
  • Method Details

    • processDouble

      public void processDouble(long timestamp, double data)
    • reset

      public void reset()
    • getCurrent

      public double[] getCurrent()
    • size

      public int size()
      Gets the size of the ema array.
      Returns:
      size of the ema array.
    • getLastTimestamp

      public long getLastTimestamp()
      Gets the last time the ema was updated.
      Returns:
      last time the ema was updated.
    • getLastSample

      public double getLastSample()