lucene::search::HitQueue Class Reference
An optimised PriorityQueue which takes ScoreDoc structs.
More...
#include <HitQueue.h>
List of all members.
Detailed Description
An optimised PriorityQueue which takes ScoreDoc structs.
Some by-ref passing and memory related optimisations have been done.
Constructor & Destructor Documentation
| lucene::search::HitQueue::HitQueue |
( |
const int32_t |
maxSize |
) |
|
| lucene::search::HitQueue::~HitQueue |
( |
|
) |
|
Member Function Documentation
| void lucene::search::HitQueue::adjustTop |
( |
|
) |
|
| bool lucene::search::HitQueue::insert |
( |
struct ScoreDoc & |
element |
) |
|
Adds element to the PriorityQueue in log(size) time if either the PriorityQueue is not full, or not lessThan(element, top()).
- Parameters:
-
- Returns:
- true if element is added, false otherwise.
| bool lucene::search::HitQueue::lessThan |
( |
struct ScoreDoc & |
hitA, |
|
|
struct ScoreDoc & |
hitB | |
|
) |
| | [protected] |
| ScoreDoc lucene::search::HitQueue::pop |
( |
|
) |
|
| void lucene::search::HitQueue::put |
( |
struct ScoreDoc & |
element |
) |
|
| size_t lucene::search::HitQueue::size |
( |
|
) |
|
Returns the number of elements currently stored in the PriorityQueue.
| struct ScoreDoc& lucene::search::HitQueue::top |
( |
|
) |
[read] |
The documentation for this class was generated from the following file: