![]() |
gtkIOStream
1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
|
#include <BST.H>
Public Types | |
| typedef int(BST_TYPE::* | BSTCompareMethod) (const BST_TYPE &) const |
| The comparison typedefinition. More... | |
Public Member Functions | |
| BST (BST_TYPE *v=NULL, BST *cL=NULL, BST *cR=NULL) | |
| ~BST (void) | |
| Destructor - any resident variable or children are deleted. More... | |
| int | add (BST_TYPE *v, BSTCompareMethod compare=NULL) |
| int | sort (LinkList< BST_TYPE *> *linkList, BSTCompareMethod compare=NULL) |
| void | removeSorted (LinkList< BST_TYPE *> *linkList) |
Private Attributes | |
| BST * | childL |
| BST * | childR |
| Left and right children nodes. More... | |
| BST_TYPE * | value |
| The pointer to the variable. More... | |
Binary Search Tree This class is useful for generating an ordered Binary Tree. This is simple and fast for sorting your data.
| BST_TYPE | the type of the variables (values) to be stored/sorted. |
| typedef int(BST_TYPE::* BST< BST_TYPE >::BSTCompareMethod) (const BST_TYPE &) const |
|
inline |
Add a new variable to the BST. This method is a recursive evaluate and store method.
| v | the new variable to add |
| compare | the comparison method to use (should be true if v>value), if NULL then check using v>value |
|
inline |
Remove from the tree adding to the LinkList<BST_TYPE *> is a sorted manner. This yields a sorted linkList.
| linkList | the pointer to the LinkList<BST_TYPE *> to add the value to. |
Definition at line 115 of file BST.H.
|
inline |
Take a LinkList<BST_TYPE *> and sort it.
| linkList | a pointer to the LinkList<BST_TYPE> to sort. |
| compare | the method for comparing two values, see add. |
Definition at line 101 of file BST.H.
|
private |
|
GTK+ IOStream
Beta
|