CLucene - a full-featured, c++ search engine
API Documentation
#include <HitQueue.h>

Public Member Functions | |
| void | adjustTop () |
| struct ScoreDoc & | top () |
| void | put (struct ScoreDoc &element) |
| ScoreDoc | pop () |
| bool | 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()). | |
| size_t | size () |
| Returns the number of elements currently stored in the PriorityQueue. | |
| HitQueue (const int32_t maxSize) | |
| ~HitQueue () | |
Protected Member Functions | |
| bool | lessThan (struct ScoreDoc &hitA, struct ScoreDoc &hitB) |
Some by-ref passing and memory related optimisations have been done.
| lucene::search::HitQueue::HitQueue | ( | const int32_t | maxSize | ) |
| lucene::search::HitQueue::~HitQueue | ( | ) |
| 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()).
| element |
| 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] |