lucene::util::PriorityQueue< _type, _valueDeletor > Class Template Reference
#include <PriorityQueue.h>
List of all members.
template<class _type, typename _valueDeletor>
class lucene::util::PriorityQueue< _type, _valueDeletor >
Constructor & Destructor Documentation
template<class _type, typename _valueDeletor>
template<class _type, typename _valueDeletor>
Member Function Documentation
template<class _type, typename _valueDeletor>
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); }
template<class _type, typename _valueDeletor>
template<class _type, typename _valueDeletor>
template<class _type, typename _valueDeletor>
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.
template<class _type, typename _valueDeletor>
template<class _type, typename _valueDeletor>
Removes and returns the least element of the PriorityQueue in log(size) time.
template<class _type, typename _valueDeletor>
Adds an Object to a PriorityQueue in log(size) time.
If one tries to add more objects than maxSize from initialize a RuntimeException (ArrayIndexOutOfBound) is thrown.
template<class _type, typename _valueDeletor>
Returns the number of elements currently stored in the PriorityQueue.
template<class _type, typename _valueDeletor>
The documentation for this class was generated from the following file: