template<typename K, typename E>
class bridges::datastructure::BSTElement< K, E >
This class can be used to create binary search tree elements, derived from BinTreeElement.
This class extends the BinTreeElement class by adding a "key" property to allow for use in a binary search tree implementation.
Generic Parameters: K that is the search key type, E the application data type
- See also
- There is a tutorial about Binary Search Trees : http://bridgesuncc.github.io/tutorials/BinarySearchTree.html
- Author
- Kalpathi Subramanian
- Date
- 6/18/15, 7/17/16, 7/12/19
|
| | BSTElement (const K &k, BSTElement *l, BSTElement *r, const E &val=E(), const string &lab=string()) |
| |
| | BSTElement (const K &k, const E &val=E(), const string &lab=string()) |
| |
| virtual const string | getDStype () const override |
| |
| K | getKey () const |
| |
| void | setKey (const K &k) |
| |
| virtual BSTElement * | getLeft () override |
| |
| virtual const BSTElement * | getLeft () const override |
| |
| void | setLeft (BSTElement *l) |
| |
| virtual BSTElement * | getRight () override |
| |
| virtual const BSTElement * | getRight () const override |
| |
| void | setRight (BSTElement *r) |
| |
| | BinTreeElement (BinTreeElement *l, BinTreeElement *r, const E &e=E(), const string &lab=string()) |
| |
| | BinTreeElement (const E &e=E(), const string &lab=string()) |
| |
| void | setLeft (BinTreeElement *l) |
| |
| void | setRight (BinTreeElement *r) |
| |
| | TreeElement (const E &e=E(), const string &lab=string()) |
| | Construct a TreeElement from given values. More...
|
| |
| vector< TreeElement * > & | getChildren () |
| | Get the children of this node. More...
|
| |
| const vector< TreeElement * > & | getChildren () const |
| | Get the children of this node. More...
|
| |
| TreeElement * | getChild (const int &n) |
| | Gets the nth child of this node. More...
|
| |
| const TreeElement * | getChild (const int &n) const |
| | Gets the nth child of this node - constant version. More...
|
| |
| void | addChild (TreeElement *child) |
| | Adds a child to children. More...
|
| |
| void | setChild (const size_t &index, TreeElement *kid) |
| | Sets child at index to "kid". More...
|
| |
| | Element (const E &val=E(), const string &lab=string()) |
| |
| | Element (const Element &e) |
| |
| Element & | operator= (const Element &e) |
| |
| E & | operator= (E const &e) |
| |
| virtual | ~Element () |
| |
| ElementVisualizer * | getVisualizer () |
| | Get the element visualizer object. More...
|
| |
| const ElementVisualizer * | getVisualizer () const |
| | Get the element visualizer object - constant version. More...
|
| |
| LinkVisualizer * | getLinkVisualizer (const Element *el) |
| | Returns the LinkVisualizer of element. More...
|
| |
| LinkVisualizer * | getLinkVisualizer (const Element *el) const |
| | Returns the LinkVisualizer of element. More...
|
| |
| string const & | getLabel () const |
| | Gets the label of this element. More...
|
| |
| void | setLabel (const string &lab) |
| | Sets label of this element. More...
|
| |
| E const & | getValue () const |
| | Gets the object held in the generic object E. More...
|
| |
| E & | getValue () |
| | Gets the object held in the generic object E. More...
|
| |
| void | setValue (const E &val) |
| | Sets generic object to "val". More...
|
| |
| void | setSize (const double &sz) |
| | Sets size of the element. More...
|
| |
| double | getSize () const |
| | Get element size. More...
|
| |
| void | setColor (const Color &col) |
| | Set the color of the Element. More...
|
| |
| void | setColor (const string col) |
| | Set the color by name. More...
|
| |
| Color | getColor () const |
| | Get the current color of the element. More...
|
| |
| void | setOpacity (double opacity) |
| | Set opacity of element - use the 4th color component. More...
|
| |
| double | getOpacity () |
| |
| void | setShape (const Shape &shp) |
| | Set the shape of the element. More...
|
| |
| Shape | getShape () const |
| | Returns the shape of the element. More...
|
| |
| void | setLocation (const double &locX, const double &locY) |
| | Sets the location attributes of an element. More...
|
| |
| double | getLocationX () const |
| | Gets the X coordinate of the location. More...
|
| |
| double | getLocationY () const |
| | Gets the Y coordinate of the location. More...
|
| |
| virtual | ~DataStructure ()=default |
| |