10 namespace datastructure {
29 template <
typename K,
typename E>
46 const string& lab =
string())
58 BSTElement(
const K& k,
const E& val = E(),
const string& lab =
string())
66 return "BinarySearchTree";
This class can be used to create binary search tree elements, derived from BinTreeElement.
Definition: BSTElement.h:30
virtual const BSTElement * getRight() const override
Definition: BSTElement.h:118
void setKey(const K &k)
Definition: BSTElement.h:80
virtual const string getDStype() const override
Definition: BSTElement.h:65
void setLeft(BSTElement *l)
Definition: BSTElement.h:103
K getKey() const
Definition: BSTElement.h:72
virtual BSTElement * getRight() override
Definition: BSTElement.h:110
BSTElement(const K &k, const E &val=E(), const string &lab=string())
Definition: BSTElement.h:58
BSTElement(const K &k, BSTElement *l, BSTElement *r, const E &val=E(), const string &lab=string())
Definition: BSTElement.h:45
virtual const string getElementRepresentation() const override
Definition: BSTElement.h:133
void setRight(BSTElement *r)
Definition: BSTElement.h:126
virtual const BSTElement * getLeft() const override
Definition: BSTElement.h:95
K key
Definition: BSTElement.h:32
virtual BSTElement * getLeft() override
Definition: BSTElement.h:87
This class can be used to create binary tree elements, derived from TreeElement.
Definition: BinTreeElement.h:24
void setLeft(BinTreeElement *l)
Definition: BinTreeElement.h:84
void setRight(BinTreeElement *r)
Definition: BinTreeElement.h:109
virtual BinTreeElement * getLeft()
Definition: BinTreeElement.h:67
virtual BinTreeElement * getRight()
Definition: BinTreeElement.h:92
virtual const string getElementRepresentation() const
Gets the JSON string of the element representation.
Definition: Element.h:235
std::string JSONencode(const T &d)
Definition: JSONutil.h:38
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