Class RunningAverageValueProcessor.RunningAverageBufferCalculator
java.lang.Object
org.scictrl.csshell.epics.server.processor.RunningAverageValueProcessor.RunningAverageBufferCalculator
- Enclosing class:
RunningAverageValueProcessor
Average calculator.
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
data
public double[] dataAccumulated data, circular buffer. -
idx
public int idxIndex in circular buffer; -
size
public int sizeActual number of accumulated points -
avg
public double avgCalculated average. -
std
public double stdCalculated STD. -
min
public double minMinimal value. -
max
public double maxMaximal value.
-
-
Constructor Details
-
RunningAverageBufferCalculator
public RunningAverageBufferCalculator(int size) Constructor.- Parameters:
size
- size of buffer
-
-
Method Details
-
reset
public void reset()Resets buffer to be empty. -
add
public void add(double value) Adds value- Parameters:
value
- new value
-