public class CumulativeQueue extends Vector<Double>
capacityIncrement, elementCount, elementData
modCount
Constructor and Description |
---|
CumulativeQueue(int length)
Create a new instance of CumulativeQueue.
|
Modifier and Type | Method and Description |
---|---|
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.
|
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSize
finalize, getClass, notify, notifyAll, wait, wait, wait
parallelStream, stream
public CumulativeQueue(int length)
length
- length of the queue to be createdpublic int currentSize()
public double getSum()
public double pop_front()
public void push_back(double x)
x
- value to be pushed at the end of the queueCopyright © 2015–2021 Fiji. All rights reserved.