public interface IndirectDoublePriorityQueue<K> extends IndirectPriorityQueue<K>
An indirect double priority queue uses two distinct comparators (called primary
and secondary) to keep its elements ordered. It makes it possible to access the
first element w.r.t. the secondary comparatory using secondaryFirst()
(and, optionally,
the last element using secondaryLast()
). The remaining methods
work like those of an indirect priority queue based on the
primary comparator.
Modifier and Type | Method and Description |
---|---|
java.util.Comparator<? super K> |
secondaryComparator()
Returns the secondary comparator of this queue.
|
int |
secondaryFirst()
Returns the first element of this queue with respect to the secondary comparator.
|
int |
secondaryFront(int[] a)
Retrieves the secondary front of the queue in a given array (optional operation).
|
int |
secondaryLast()
Returns the last element of this queue with respect to the secondary comparator (optional operation).
|
allChanged, changed, changed, clear, comparator, contains, dequeue, enqueue, first, front, isEmpty, last, remove, size
java.util.Comparator<? super K> secondaryComparator()
secondaryFirst()
int secondaryFirst()
int secondaryLast()
int secondaryFront(int[] a)
a
- an array large enough to hold the secondary front (e.g., at least long as the reference array).a
).IndirectPriorityQueue.front(int[])