Package org.apache.lucene.search
Class DisiPriorityQueue
- java.lang.Object
-
- org.apache.lucene.search.DisiPriorityQueue
-
- All Implemented Interfaces:
java.lang.Iterable<DisiWrapper>
public 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 overPriorityQueue
because the pluggable comparison function makes the rebalancing quite slow.
-
-
Field Summary
Fields Modifier and Type Field Description private DisiWrapper[]
heap
private int
size
-
Constructor Summary
Constructors Constructor Description DisiPriorityQueue(int maxSize)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
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:
iterator
in interfacejava.lang.Iterable<DisiWrapper>
-
-