7 namespace datastructure {
25 template <
typename K,
typename E>
29 int height = 0, balFactor = 0;
41 :
BSTElement<K, E>(k, nullptr, nullptr, val, lab) {}
132 virtual const string getElementRepresentation() const override final {
This class can be used to create avl tree elements, derived from BSTElement.
Definition: AVLTreeElement.h:26
void setBalanceFactor(const int &bf)
Definition: AVLTreeElement.h:77
virtual const AVLTreeElement * getLeft() const override
Definition: AVLTreeElement.h:92
virtual const AVLTreeElement * getRight() const override
Definition: AVLTreeElement.h:115
int getHeight() const
Definition: AVLTreeElement.h:54
AVLTreeElement(const K &k, const E &val=E(), const string &lab=string())
Definition: AVLTreeElement.h:40
void setRight(AVLTreeElement *r)
Definition: AVLTreeElement.h:123
virtual const string getDStype() const override
Definition: AVLTreeElement.h:47
virtual AVLTreeElement * getLeft() override
Definition: AVLTreeElement.h:84
int getBalanceFactor() const
Definition: AVLTreeElement.h:69
virtual AVLTreeElement * getRight() override
Definition: AVLTreeElement.h:107
void setHeight(const int &h)
Definition: AVLTreeElement.h:62
void setLeft(AVLTreeElement *l)
Definition: AVLTreeElement.h:100
This class can be used to create binary search tree elements, derived from BinTreeElement.
Definition: BSTElement.h:30
void setLeft(BSTElement *l)
Definition: BSTElement.h:103
virtual BSTElement * getRight() override
Definition: BSTElement.h:110
virtual const string getElementRepresentation() const override
Definition: BSTElement.h:133
void setRight(BSTElement *r)
Definition: BSTElement.h:126
virtual BSTElement * getLeft() override
Definition: BSTElement.h:87
Support for drawing Bar charts.
Definition: alltypes.h:4
const string COLON
Definition: DataStructure.h:52
const string COMMA
Definition: DataStructure.h:51
const string QUOTE
Definition: DataStructure.h:50