public final class WindowedMean extends Object
Constructor and Description |
---|
WindowedMean(int window_size)
constructor, window_size specifies the number of samples we will continuously get the mean and variance from.
|
Modifier and Type | Method and Description |
---|---|
void |
addValue(float value)
adds a new sample to this mean.
|
void |
clear()
clears this WindowedMean.
|
float |
getLatest() |
float |
getMean()
returns the mean of the samples added to this instance.
|
float |
getOldest() |
int |
getWindowSize() |
boolean |
hasEnoughData() |
float |
standardDeviation() |
public WindowedMean(int window_size)
window_size
- size of the sample windowpublic boolean hasEnoughData()
public void clear()
public void addValue(float value)
value
- The value to addpublic float getMean()
public float getOldest()
public float getLatest()
public float standardDeviation()
public int getWindowSize()
Copyright © 2015. All rights reserved.