|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.jabm.util.FixedLengthQueue
public class FixedLengthQueue
A queue with fixed length, which can be useful when tracking a sliding window on a data series

| Field Summary | |
|---|---|
protected int |
count
|
protected int |
curIndex
|
protected double[] |
list
|
protected double |
sum
|
| Constructor Summary | |
|---|---|
FixedLengthQueue(int length)
|
|
| Method Summary | |
|---|---|
int |
count()
|
double |
getMean()
|
void |
initialize()
|
void |
newData(double value)
|
void |
reset()
Reinitialise our state to the original settings. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected double[] list
protected int curIndex
protected double sum
protected int count
| Constructor Detail |
|---|
public FixedLengthQueue(int length)
| Method Detail |
|---|
public void initialize()
public void reset()
Resetable
reset in interface Resetablepublic void newData(double value)
public int count()
public double getMean()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||