All Packages Class Hierarchy This Package Previous Next Index
Class com.micronova.util.IXPQueue
java.lang.Object
|
+----com.micronova.util.IXVector
|
+----com.micronova.util.IXPQueue
- public abstract class IXPQueue
- extends IXVector
IXPQueue is element-type-independent priority queue implemented as an IXVector. Elements are stored at indexes 1, 2, ..., and 0-th position is used as push/pull gateway. MAKE SURE THE LENGTH IS GREATER THAN 0.
- Version:
- 1.0
-
IXPQueue()
-
-
_compare(int, int)
- Returns true if element at index 'i' is 'smaller' than that at index 'j'.
-
_down(int)
- Moves down element at i to the right position in the queue.
-
_pull0(int)
- Pulls the i-th element out to index 0.
-
_push0()
- Pushes the element at index 0.
-
_swap(int, int)
- Swaps i-th element with j-th.
-
_up(int)
- Moves up element at i to the right position in the queue.
IXPQueue
public IXPQueue()
_compare
protected abstract boolean _compare(int i,
int j)
- Returns true if element at index 'i' is 'smaller' than that at index 'j'. The 'smallest' element is always found at index 1.
_swap
protected abstract void _swap(int i,
int j)
- Swaps i-th element with j-th.
_up
protected final void _up(int i)
- Moves up element at i to the right position in the queue.
_down
protected final void _down(int i)
- Moves down element at i to the right position in the queue.
_push0
protected final void _push0()
- Pushes the element at index 0.
_pull0
protected final void _pull0(int i)
- Pulls the i-th element out to index 0. The index must be greater than 0. It is assumed that 0-th element is already 'unset'.
All Packages Class Hierarchy This Package Previous Next Index