19 template <
typename KeyType,
typename ValueType>
146 void Reset(
int maxElements);
177 inline bool GetMinimum(KeyType& key, ValueType& value)
const;
200 Record*
Insert(KeyType
const& key, ValueType
const& value);
218 bool Remove(KeyType& key, ValueType& value);
259 std::vector<Record> mRecords;
260 std::vector<Record*> mPointers;
262#include "NeMinHeap.inl"
Minimum heap binary tree.
Record * Insert(KeyType const &key, ValueType const &value)
Insert into the min-heap the 'value' that corresponds to the 'key'.
int GetNumElements() const
Get the remaining number of elements in the min-heap. This number is in the range {0....
bool IsValid() const
Support for debugging. The functions test whether the data structure is a valid min-heap.
bool Remove(KeyType &key, ValueType &value)
Remove the root of the heap and return its 'key' and 'value members.
bool GetMinimum(KeyType &key, ValueType &value) const
Get the root of the min-heap. The return value is 'true' whenever the min-heap is not empty....
void Update(Record *record, ValueType const &value)
The value of a heap record must be modified through this function call.
void Reset(int maxElements)
Resets the given maxElements.
MinHeap(MinHeap const &minHeap)
Copy constructor.