Class DisiPriorityQueue
- java.lang.Object
-
- org.apache.lucene.queries.intervals.DisiPriorityQueue
-
- All Implemented Interfaces:
java.lang.Iterable<DisiWrapper>
final class DisiPriorityQueue extends java.lang.Object implements java.lang.Iterable<DisiWrapper>
A priority queue of DocIdSetIterators that orders by current doc ID. This specialization is needed overPriorityQueuebecause the pluggable comparison function makes the rebalancing quite slow.
-
-
Field Summary
Fields Modifier and Type Field Description private DisiWrapper[]heapprivate intsize
-
Constructor Summary
Constructors Constructor Description DisiPriorityQueue(int maxSize)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DisiWrapperadd(DisiWrapper entry)(package private) voiddownHeap(int size)java.util.Iterator<DisiWrapper>iterator()(package private) static intleftNode(int node)(package private) static intparentNode(int node)DisiWrapperpop()private DisiWrapperprepend(DisiWrapper w1, DisiWrapper w2)(package private) static intrightNode(int leftNode)intsize()DisiWrappertop()DisiWrappertopList()Get the list of scorers which are on the current doc.private DisiWrappertopList(DisiWrapper list, DisiWrapper[] heap, int size, int i)DisiWrapperupdateTop()(package private) DisiWrapperupdateTop(DisiWrapper topReplacement)(package private) voidupHeap(int i)
-
-
-
Field Detail
-
heap
private final DisiWrapper[] heap
-
size
private int size
-
-
Method Detail
-
leftNode
static int leftNode(int node)
-
rightNode
static int rightNode(int leftNode)
-
parentNode
static int parentNode(int node)
-
size
public int size()
-
top
public DisiWrapper top()
-
topList
public DisiWrapper topList()
Get the list of scorers which are on the current doc.
-
prepend
private DisiWrapper prepend(DisiWrapper w1, DisiWrapper w2)
-
topList
private DisiWrapper topList(DisiWrapper list, DisiWrapper[] heap, int size, int i)
-
add
public DisiWrapper add(DisiWrapper entry)
-
pop
public DisiWrapper pop()
-
updateTop
public DisiWrapper updateTop()
-
updateTop
DisiWrapper updateTop(DisiWrapper topReplacement)
-
upHeap
void upHeap(int i)
-
downHeap
void downHeap(int size)
-
iterator
public java.util.Iterator<DisiWrapper> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<DisiWrapper>
-
-