#include <genericheap.h>
Public Member Functions | |
GenericHeap ()=default | |
GenericHeap (int initial_size) | |
bool | empty () const |
int | size () const |
int | size_reserved () const |
void | clear () |
GenericVector< Pair > * | heap () |
const Pair & | get (int index) const |
void | Push (Pair *entry) |
const Pair & | PeekTop () const |
const Pair & | PeekWorst () const |
bool | Pop (Pair *entry) |
bool | PopWorst (Pair *entry) |
int | IndexOfWorst () const |
void | Reshuffle (Pair *pair) |
Private Member Functions | |
int | SiftUp (int hole_index, const Pair &pair) |
int | SiftDown (int hole_index, const Pair &pair) |
int | ParentNode (int index) const |
int | LeftChild (int index) const |
Private Attributes | |
GenericVector< Pair > | heap_ |
|
default |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
|
private |