|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.app.quant.util.BarBuffer
public class BarBuffer
A buffer of bar segments.
Constructor Summary | |
---|---|
BarBuffer(int thePeriods)
Construct the object. |
Method Summary | |
---|---|
void |
add(double d)
Add a bar. |
void |
add(double[] d)
Add a bar. |
double |
average(int idx)
Average all of the bars. |
double |
averageGain(int idx)
Get the average gain. |
double |
averageLoss(int idx)
Get the average loss. |
List<double[]> |
getData()
|
boolean |
getFull()
Determine if the buffer is full. |
double |
max(int idx)
Get the max for the specified index. |
double |
min(int idx)
Get the min for the specified index. |
double[] |
pop()
Pop (and remove) the oldest bar in the buffer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BarBuffer(int thePeriods)
thePeriods
- The number of periods.Method Detail |
---|
public final void add(double d)
d
- The bar data.public final void add(double[] d)
d
- The bar data.public final double average(int idx)
idx
- The bar index to average.
public final double averageGain(int idx)
idx
- The field to get the average gain for.
public final double averageLoss(int idx)
idx
- The index to check for.
public final List<double[]> getData()
public final boolean getFull()
public final double max(int idx)
idx
- The index to check.
public final double min(int idx)
idx
- The index to check.
public final double[] pop()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |