#include <maxheap.h>
|
| MaxHeap (size_t initsize=0) |
| default constructor More...
|
|
| ~MaxHeap () |
|
bool | is_notempty () const |
| return true if heap is empty More...
|
|
size_t | get_size () const |
| return numebr of items stored in the heap More...
|
|
void | push (const double &key, const val_t &val) |
| push a new element in the heap and resize the data structure if it is full More...
|
|
void | pop () |
| remove the element on the top of the heap, i.e. More...
|
|
val_t & | top () const |
| ref to the top element More...
|
|
template<typename val_t >
default constructor
- Parameters
-
initsize | set the initial size of the data structure if available |
template<typename val_t >
template<typename val_t >
size_t MaxHeap< val_t >::get_size |
( |
| ) |
const |
|
inline |
return numebr of items stored in the heap
template<typename val_t >
bool MaxHeap< val_t >::is_notempty |
( |
| ) |
const |
|
inline |
return true if heap is empty
template<typename val_t >
remove the element on the top of the heap, i.e.
the element with max key value
template<typename val_t >
void MaxHeap< val_t >::push |
( |
const double & |
key, |
|
|
const val_t & |
val |
|
) |
| |
|
inline |
push a new element in the heap and resize the data structure if it is full
- Parameters
-
key | ordering key of the new element |
val | value of the new element |
template<typename val_t >
val_t& MaxHeap< val_t >::top |
( |
| ) |
const |
|
inline |
template<typename val_t >
template<typename val_t >
template<typename val_t >
The documentation for this class was generated from the following file: