public class DataSmoother
extends java.lang.Object
Constructor and Description |
---|
DataSmoother(int buffer_size)
Constructor
|
Modifier and Type | Method and Description |
---|---|
double |
addValue(double new_val)
Add a value to our accumulated value
|
boolean |
dataPrimed()
See if our buffer has been fully primed
|
double |
getAverage()
Get the average calculated value
|
int |
getBuffSize()
Get the Buffer size
|
boolean |
isEmpty()
See if our buffer is empty
|
void |
reset()
Reset the DataSmoother
|
public DataSmoother(int buffer_size)
buffer_size
- the number of items in our bufferpublic boolean dataPrimed()
public boolean isEmpty()
public void reset()
public int getBuffSize()
public double getAverage()
public double addValue(double new_val)
new_val
- the new value to add