Package org.apache.lucene.queries.spans
Class SpanDisiPriorityQueue
- java.lang.Object
-
- org.apache.lucene.queries.spans.SpanDisiPriorityQueue
-
- All Implemented Interfaces:
java.lang.Iterable<SpanDisiWrapper>
final class SpanDisiPriorityQueue extends java.lang.Object implements java.lang.Iterable<SpanDisiWrapper>
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 SpanDisiWrapper[]
heap
private int
size
-
Constructor Summary
Constructors Constructor Description SpanDisiPriorityQueue(int maxSize)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SpanDisiWrapper
add(SpanDisiWrapper entry)
(package private) void
downHeap(int size)
java.util.Iterator<SpanDisiWrapper>
iterator()
(package private) static int
leftNode(int node)
(package private) static int
parentNode(int node)
SpanDisiWrapper
pop()
private SpanDisiWrapper
prepend(SpanDisiWrapper w1, SpanDisiWrapper w2)
(package private) static int
rightNode(int leftNode)
int
size()
SpanDisiWrapper
top()
SpanDisiWrapper
topList()
Get the list of scorers which are on the current doc.private SpanDisiWrapper
topList(SpanDisiWrapper list, SpanDisiWrapper[] heap, int size, int i)
SpanDisiWrapper
updateTop()
(package private) SpanDisiWrapper
updateTop(SpanDisiWrapper topReplacement)
(package private) void
upHeap(int i)
-
-
-
Field Detail
-
heap
private final SpanDisiWrapper[] 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 SpanDisiWrapper top()
-
topList
public SpanDisiWrapper topList()
Get the list of scorers which are on the current doc.
-
prepend
private SpanDisiWrapper prepend(SpanDisiWrapper w1, SpanDisiWrapper w2)
-
topList
private SpanDisiWrapper topList(SpanDisiWrapper list, SpanDisiWrapper[] heap, int size, int i)
-
add
public SpanDisiWrapper add(SpanDisiWrapper entry)
-
pop
public SpanDisiWrapper pop()
-
updateTop
public SpanDisiWrapper updateTop()
-
updateTop
SpanDisiWrapper updateTop(SpanDisiWrapper topReplacement)
-
upHeap
void upHeap(int i)
-
downHeap
void downHeap(int size)
-
iterator
public java.util.Iterator<SpanDisiWrapper> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<SpanDisiWrapper>
-
-