5 #ifndef VMML_BinarySearchTree_h
6 #define VMML_BinarySearchTree_h
32 return this->
root->insert(data);
43 if(this->
root->getData() == _data)
51 if(nodeToDelete->
getLeft() == 0L)
54 }
else if ( nodeToDelete->
getRight() == 0L){
61 this->
root->getParent()->setLeft(0L);
64 if(this->
root->getRight() != 0L){
71 this->
root->setLeft(newLeft);
73 this->
root->setParent(0L);
79 return this->
root->remove(_data);
void setLeft(BinarySearchTreeNode< T > *node)
Definition: BinarySearchTreeNode.h:162
Definition: BinarySearchTreeNode.h:13
void setRight(BinarySearchTreeNode< T > *node)
Definition: BinarySearchTreeNode.h:171
Definition: AvalancheTrainingSimulationEngine.h:39
BinarySearchTreeNode< T > * search(T data)
Definition: BinarySearchTree.h:22
BinarySearchTree(T data)
Definition: BinarySearchTree.h:18
~BinarySearchTree()
Definition: BinarySearchTree.h:19
BintreeNode< T > * root
Definition: Bintree.h:15
BinarySearchTreeNode< T > * getLeft()
Definition: BinarySearchTreeNode.h:155
Definition: BinarySearchTree.h:13
BinarySearchTreeNode< T > * getRight()
Definition: BinarySearchTreeNode.h:158
bool insert(T data)
Definition: BinarySearchTree.h:28
BinarySearchTree()
Definition: BinarySearchTree.h:17