Binary tree template.
Public Member Functions | |
| BinTree () | |
| ~BinTree () | |
| int | Clear () |
| BinTreeNode< T > * | Insert (T aData) |
| BinTreeNode< T > * | InsertAt (T aData, BinTreeNode< T > *aNode, eBinTreeNode aChild=eBinTreeNode_Left) |
| int | Size () |
| astl::list< BinTreeNode< T > * > & | GetLeafList () |
| astl::list< BinTreeNode< T > * > & | GetNodeList () |
| BinTree | ( | ) |
| ~BinTree | ( | ) |
| int Clear | ( | ) |
Clears the entire tree
| BinTreeNode<T>* Insert | ( | T | aData | ) |
Insert a node to the tree.
| BinTreeNode<T>* InsertAt | ( | T | aData, |
| BinTreeNode< T > * | aNode, | ||
| eBinTreeNode | aChild = eBinTreeNode_Left |
||
| ) |
Insert a node into a certain node in the tree
| aData | the data to insert |
| aNode | the node to insert the data in |
| aChild | what child to insert at |
| int Size | ( | ) |
Get the size of the tree
| astl::list<BinTreeNode<T>*>& GetLeafList | ( | ) |
| astl::list<BinTreeNode<T>*>& GetNodeList | ( | ) |
Get a list of all the nodes in the tree
1.8.7