Elm
1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/genstruct/SortedBinTree.h>
Additional Inherited Members | |
Public Member Functions inherited from elm::genstruct::GenSortedBinTree< T, IdAdapter< T >, C > | |
GenSortedBinTree (void) | |
~GenSortedBinTree (void) | |
int | count (void) const |
bool | contains (const T &value) const |
bool | isEmpty (void) const |
operator bool (void) const | |
void | clear (void) |
void | add (const T &value) |
void | addAll (const S< T > &items) |
void | remove (const T &value) |
void | remove (const Iterator &iter) |
void | removeAll (const S< T > &items) |
const T * | look (const typename IdAdapter< T >::key_t &key) const |
T * | look (const typename IdAdapter< T >::key_t &key) |
This class provides a collection implementation as a sorted binary tree. Whatever the performed action (lookup, insertion or deletion), it has an average complexity of O(log(n)) with a worst case of O(n). The worst case is reached if the items are inserting in order. Notice that no method of this class is implemented recursively.
This class implements the concept of concept::MutableCollection.
T | Type of items in the data structure. |
C | Type describing the comparison operation (must implement elm::concept::Comparator<T>, elm::Comparator<T> as a default). |