|
Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
heap build using C++ algorithm features More...
#include <CppHeap.h>
Public Member Functions | |
| CppHeap (Comparator comparator=Comparator()) | |
| void | insert (const T &value) |
| const T & | getMax () const |
| finds the maximum value in the heap More... | |
| T | extractMax () |
| finds and removes the maximum value from the heap More... | |
| void | mergeWith (CppHeap< T, Comparator > &&that) |
| merges this heap with another heap (!! this is a DESTRUCTIVE merge, heap in argument will be cleared !!) More... | |
| size_t | size () const |
Protected Attributes | |
| Comparator | m_comparator |
| std::vector< T > | m_data |
heap build using C++ algorithm features
|
inline |
| T alib::CppHeap< T, Comparator >::extractMax |
finds and removes the maximum value from the heap
|
inline |
finds the maximum value in the heap
| void alib::CppHeap< T, Comparator >::insert | ( | const T & | value | ) |
| void alib::CppHeap< T, Comparator >::mergeWith | ( | CppHeap< T, Comparator > && | that | ) |
merges this heap with another heap (!! this is a DESTRUCTIVE merge, heap in argument will be cleared !!)
|
inline |
|
protected |
|
protected |