FirteX-高性能全文索引和检索平台API Documentation |
#include <PriorityQueue.h>
公有成员 | |
| virtual | ~CPriorityQueue () |
| void | put (_type element) |
| bool | insert (_type element) |
| _type | top () |
| _type | pop () |
| void | adjustTop () |
| size_t | size () |
| void | clear () |
保护成员 | |
| CPriorityQueue () | |
| virtual bool | lessThan (_type a, _type b)=0 |
| void | initialize (const size_t maxSize, bool deleteOnClear) |
|
|||||||||
|
|
|
|||||||||
|
|
|
|||||||||
|
Should be called when the object at top changes values. Still log(n) worst case, but it's at least twice as fast to
{ pq.top().change(); pq.adjustTop(); }
instead of
{ o = pq.pop(); o.change(); pq.push(o); }
|
|
|||||||||
|
Removes all entries from the CPriorityQueue. |
|
||||||||||||||||
|
Subclass constructors must call this. |
|
||||||||||
|
Adds element to the CPriorityQueue in log(size) time if either the CPriorityQueue is not full, or not lessThan(element, top()).
|
|
||||||||||||||||
|
Determines the ordering of objects in this priority queue. Subclassesmust define this one method. 在firtex::search::CHitQueue及firtex::search::CFieldDocSortedHitQueue内被实现。 |
|
|||||||||
|
Removes and returns the least element of the CPriorityQueue in log(size) time. |
|
||||||||||
|
Adds an Object to a CPriorityQueue in log(size) time. If one tries to add more objects than m_maxSize from initialize a RuntimeException (ArrayIndexOutOfBound) is thrown. |
|
|||||||||
|
Returns the number of elements currently stored in the CPriorityQueue. |
|
|||||||||
|
Returns the least element of the CPriorityQueue in constant time. |
http://www.firtex.org http://www.sourceforge.net/projects/firtex