|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object eos.util.Averager
public class Averager
A tool to calculate the mean of a data series. Data are continuously fed into a fixed-size buffer, and their average are calculated. When the buffer is full, the oldest datum would be swapped out.
Constructor Summary | |
---|---|
Averager(int size)
Create a new Averager with buffer size size |
Method Summary | |
---|---|
double |
update(double val)
Add val to buffer and returns the mean of data in the buffer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Averager(int size)
size
- Method Detail |
---|
public double update(double val)
val
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |