public final class DisiPriorityQueue extends java.lang.Object implements java.lang.Iterable<DisiWrapper>
PriorityQueue
because the
pluggable comparison function makes the rebalancing quite slow.Modifier and Type | Field and Description |
---|---|
private DisiWrapper[] |
heap |
private int |
size |
Constructor and Description |
---|
DisiPriorityQueue(int maxSize) |
Modifier and Type | Method and Description |
---|---|
DisiWrapper |
add(DisiWrapper entry) |
(package private) void |
downHeap(int size) |
java.util.Iterator<DisiWrapper> |
iterator() |
(package private) static int |
leftNode(int node) |
(package private) static int |
parentNode(int node) |
DisiWrapper |
pop() |
private DisiWrapper |
prepend(DisiWrapper w1,
DisiWrapper w2) |
(package private) static int |
rightNode(int leftNode) |
int |
size() |
DisiWrapper |
top() |
DisiWrapper |
topList()
Get the list of scorers which are on the current doc.
|
private DisiWrapper |
topList(DisiWrapper list,
DisiWrapper[] heap,
int size,
int i) |
DisiWrapper |
updateTop() |
(package private) DisiWrapper |
updateTop(DisiWrapper topReplacement) |
(package private) void |
upHeap(int i) |
private final DisiWrapper[] heap
private int size
static int leftNode(int node)
static int rightNode(int leftNode)
static int parentNode(int node)
public int size()
public DisiWrapper top()
public DisiWrapper topList()
private DisiWrapper prepend(DisiWrapper w1, DisiWrapper w2)
private DisiWrapper topList(DisiWrapper list, DisiWrapper[] heap, int size, int i)
public DisiWrapper add(DisiWrapper entry)
public DisiWrapper pop()
public DisiWrapper updateTop()
DisiWrapper updateTop(DisiWrapper topReplacement)
void upHeap(int i)
void downHeap(int size)
public java.util.Iterator<DisiWrapper> iterator()
iterator
in interface java.lang.Iterable<DisiWrapper>