|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.browseengine.bobo.sort.DocIDPriorityQueue
public class DocIDPriorityQueue
| Field Summary | |
|---|---|
int |
base
|
protected org.apache.lucene.search.ScoreDoc[] |
heap
|
int |
size
|
| Constructor Summary | |
|---|---|
DocIDPriorityQueue(DocComparator comparator,
int maxSize,
int base)
|
|
| Method Summary | |
|---|---|
org.apache.lucene.search.ScoreDoc |
add(org.apache.lucene.search.ScoreDoc element)
Adds an Object to a PriorityQueue in log(size) time. |
void |
clear()
Removes all entries from the PriorityQueue. |
org.apache.lucene.search.ScoreDoc |
pop()
Removes and returns the least element of the PriorityQueue in log(size) time. |
org.apache.lucene.search.ScoreDoc |
replace(org.apache.lucene.search.ScoreDoc element)
|
org.apache.lucene.search.ScoreDoc |
replace(org.apache.lucene.search.ScoreDoc newEle,
org.apache.lucene.search.ScoreDoc oldEle)
Takes O(size) time. |
int |
size()
Returns the number of elements currently stored in the PriorityQueue. |
Comparable<?> |
sortValue(org.apache.lucene.search.ScoreDoc doc)
|
org.apache.lucene.search.ScoreDoc |
top()
Returns the least element of the PriorityQueue in constant time. |
org.apache.lucene.search.ScoreDoc |
updateTop()
Should be called when the Object at top changes values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int size
protected final org.apache.lucene.search.ScoreDoc[] heap
public final int base
| Constructor Detail |
|---|
public DocIDPriorityQueue(DocComparator comparator,
int maxSize,
int base)
| Method Detail |
|---|
public final org.apache.lucene.search.ScoreDoc add(org.apache.lucene.search.ScoreDoc element)
ArrayIndexOutOfBoundsException is thrown.
public Comparable<?> sortValue(org.apache.lucene.search.ScoreDoc doc)
public org.apache.lucene.search.ScoreDoc replace(org.apache.lucene.search.ScoreDoc element)
public org.apache.lucene.search.ScoreDoc replace(org.apache.lucene.search.ScoreDoc newEle,
org.apache.lucene.search.ScoreDoc oldEle)
public final org.apache.lucene.search.ScoreDoc top()
public final org.apache.lucene.search.ScoreDoc pop()
public final org.apache.lucene.search.ScoreDoc updateTop()
pq.top().change(); pq.updateTop();instead of
o = pq.pop(); o.change(); pq.push(o);
public final int size()
public final void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||