Class SimpleMovingAverage

java.lang.Object
org.wso2.carbon.diagnostics.trafficanalyzer.SimpleMovingAverage

public class SimpleMovingAverage extends Object
This class is responsible for calculating the Simple Moving Average of a given data set.
  • Constructor Details

    • SimpleMovingAverage

      public SimpleMovingAverage(int windowSize)
  • Method Details

    • update

      public double update(int newDataPoint)
    • addDataToList

      public void addDataToList(int newData)
    • getTempList

      public List<Integer> getTempList()
    • setMa

      public void setMa(double ma)
    • getCurrentThreshold

      public double getCurrentThreshold()