Class SimpleMovingAverage
java.lang.Object
org.wso2.carbon.diagnostics.trafficanalyzer.SimpleMovingAverage
This class is responsible for calculating the Simple Moving Average of a given data set.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDataToList(int newData) doublevoidsetMa(double ma) doubleupdate(int newDataPoint)
-
Constructor Details
-
SimpleMovingAverage
public SimpleMovingAverage(int windowSize)
-
-
Method Details
-
update
public double update(int newDataPoint) -
addDataToList
public void addDataToList(int newData) -
getTempList
-
setMa
public void setMa(double ma) -
getCurrentThreshold
public double getCurrentThreshold()
-