Template Class Heap
Defined in File Heap.h
Inheritance Relationships
Base Type
private std::vector< HeapEntry >
Class Documentation
-
template<class HeapEntry, class HeapInterface>
class Heap : private std::vector<HeapEntry> A class implementing a heap.
Public Types
-
typedef Heap<HeapEntry, HeapInterface> This
Public Functions
-
inline Heap()
Constructor.
-
inline Heap(const HeapInterface &i)
Construct with a given
HeapInterface.
-
inline ~Heap()
Destructor.
-
inline void clear()
clear the heap
-
inline bool empty()
is heap empty?
-
inline unsigned int size()
returns the size of heap
-
inline void reserve(unsigned int n)
reserve space for N entries
-
inline void pop_front()
delete the first entry
-
inline void update(HeapEntry h)
update an entry: change the key and update the position to reestablish the heap property.
-
inline bool check()
Check heap condition.
- Returns:
trueif heap condition is satisfied,falseif not.
-
typedef Heap<HeapEntry, HeapInterface> This