GRASS Programmer's Manual
6.4.2(2012)
|
#include <minmaxheap.h>
Public Member Functions | |
BasicMinMaxHeap (HeapIndex size) | |
virtual | ~BasicMinMaxHeap (void) |
bool | empty (void) const |
HeapIndex | size () const |
T | get (HeapIndex i) const |
void | insert (const T &elt) |
bool | min (T &elt) const |
bool | extract_min (T &elt) |
bool | max (T &elt) const |
bool | extract_max (T &elt) |
bool | extract_all_min (T &elt) |
void | reset () |
void | clear () |
void | destructiveVerify () |
void | verify () |
void | print () const |
void | print_range () const |
Protected Member Functions | |
virtual void | grow ()=0 |
Static Protected Member Functions | |
static T * | allocateHeap (HeapIndex n) |
static void | freeHeap (T *) |
Protected Attributes | |
HeapIndex | maxsize |
HeapIndex | lastindex |
T * | A |
Friends | |
ostream & | operator<< (ostream &s, const BasicMinMaxHeap< T > &pq) |
Definition at line 71 of file minmaxheap.h.
BasicMinMaxHeap< T >::BasicMinMaxHeap | ( | HeapIndex | size | ) | [inline] |
Definition at line 83 of file minmaxheap.h.
References MY_LOG_DEBUG_ID.
virtual BasicMinMaxHeap< T >::~BasicMinMaxHeap | ( | void | ) | [inline, virtual] |
Definition at line 94 of file minmaxheap.h.
References MY_LOG_DEBUG_ID.
T * BasicMinMaxHeap< T >::allocateHeap | ( | HeapIndex | n | ) | [static, protected] |
Definition at line 639 of file minmaxheap.h.
void BasicMinMaxHeap< T >::clear | ( | ) |
Definition at line 632 of file minmaxheap.h.
void BasicMinMaxHeap< T >::destructiveVerify | ( | ) |
Definition at line 667 of file minmaxheap.h.
bool BasicMinMaxHeap< T >::empty | ( | void | ) | const [inline] |
Definition at line 99 of file minmaxheap.h.
bool BasicMinMaxHeap< T >::extract_all_min | ( | T & | elt | ) |
Definition at line 540 of file minmaxheap.h.
References min.
bool BasicMinMaxHeap< T >::extract_max | ( | T & | elt | ) |
Definition at line 564 of file minmaxheap.h.
bool BasicMinMaxHeap< T >::extract_min | ( | T & | elt | ) |
Definition at line 523 of file minmaxheap.h.
void BasicMinMaxHeap< T >::freeHeap | ( | T * | p | ) | [static, protected] |
Definition at line 652 of file minmaxheap.h.
T BasicMinMaxHeap< T >::get | ( | HeapIndex | i | ) | const [inline] |
Definition at line 105 of file minmaxheap.h.
virtual void BasicMinMaxHeap< T >::grow | ( | ) | [protected, pure virtual] |
Implemented in UnboundedMinMaxHeap< T >, and MinMaxHeap< T >.
void BasicMinMaxHeap< T >::insert | ( | const T & | elt | ) |
Definition at line 504 of file minmaxheap.h.
References MY_LOG_DEBUG_ID, and XXX.
bool BasicMinMaxHeap< T >::max | ( | T & | elt | ) | const |
Definition at line 598 of file minmaxheap.h.
bool BasicMinMaxHeap< T >::min | ( | T & | elt | ) | const |
Definition at line 586 of file minmaxheap.h.
void BasicMinMaxHeap< T >::print | ( | ) | const |
Definition at line 479 of file minmaxheap.h.
void BasicMinMaxHeap< T >::print_range | ( | ) | const |
Definition at line 489 of file minmaxheap.h.
void BasicMinMaxHeap< T >::reset | ( | ) |
Definition at line 619 of file minmaxheap.h.
References MY_LOG_DEBUG_ID, and NULL.
HeapIndex BasicMinMaxHeap< T >::size | ( | ) | const [inline] |
Definition at line 100 of file minmaxheap.h.
Referenced by gui_modules.preferences.PreferencesDialog::__init__(), and gui_modules.gmodeler.PreferencesDialog::__init__().
void BasicMinMaxHeap< T >::verify | ( | ) |
Definition at line 703 of file minmaxheap.h.
ostream& operator<< | ( | ostream & | s, |
const BasicMinMaxHeap< T > & | pq | ||
) | [friend] |
Definition at line 129 of file minmaxheap.h.
T* BasicMinMaxHeap< T >::A [protected] |
Definition at line 75 of file minmaxheap.h.
HeapIndex BasicMinMaxHeap< T >::lastindex [protected] |
Definition at line 74 of file minmaxheap.h.
HeapIndex BasicMinMaxHeap< T >::maxsize [protected] |
Definition at line 73 of file minmaxheap.h.