|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.Vector<java.lang.Double>
bunwarpj.CumulativeQueue
public class CumulativeQueue
Class to create a cumulative queue in bUnwarpJ.
| Field Summary | |
|---|---|
private int |
currentLength
current lenght of the queue |
private int |
ridx
front index of the queue |
private double |
sum
queue sum |
private int |
widx
rear index of the queue |
| Fields inherited from class java.util.Vector |
|---|
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
CumulativeQueue(int length)
Create a new instance of CumulativeQueue. |
|
| Method Summary | |
|---|---|
int |
currentSize()
Get the current size of the queue. |
double |
getSum()
Get the sum of the queue. |
double |
pop_front()
Pop the value from the front of the queue. |
void |
push_back(double x)
Push a value at the end of the queue. |
| Methods inherited from class java.util.Vector |
|---|
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
iterator, listIterator, listIterator |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
iterator, listIterator, listIterator |
| Field Detail |
|---|
private int ridx
private int widx
private int currentLength
private double sum
| Constructor Detail |
|---|
public CumulativeQueue(int length)
length - length of the queue to be created| Method Detail |
|---|
public int currentSize()
public double getSum()
public double pop_front()
public void push_back(double x)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||