#include <SimpleHeap.h>
Inheritance diagram for SimpleHeap::

Public Methods | |
| SimpleHeap (const char *nameBuff="Unnamed") | |
| Constructor, which specifies a name for the tree. | |
| bool & | duplicate () |
Returns the value of duplicate_flag. | |
| bool & | check_duplicates () |
Returns the value of check_duplicates_flag. | |
Protected Methods | |
| SimpleHeapItem< T > * | insert (T *key) |
| void | extract (SimpleHeapItem< T > *item, bool &status) |
Protected Attributes | |
| bool | duplicate_flag |
| Records whether the last item inserted was a duplicate. | |
| bool | check_duplicates_flag |
If true then track items in the tree that are duplicates. | |
The SimpleHeap class is derived from AbstractHeap, which defines the basic operations of the heap. This particular instantiation of heaps uses a simple data type for the key, and no auxillary data is associated with the key. This greatly simplifies the definition of the heap, but it assumes that copying the key is relatively inexpensive (e.g. no memory allocation/deallocation is required).
This template class can be instantiated with a data type for which the following methods are defined: