Bridges-Python
3.4.4
Bridges(Python API)
|
Public Member Functions | |
None | __init__ (self, **kwargs) |
Constructor for Tree Element. More... | |
str | get_data_structure_type (self) |
Gets the data structure type. More... | |
None | add_child (self, child) |
Adds a child to this parent node. More... | |
int | get_number_of_children (self) |
Get the number of children at this node. More... | |
None | set_child (self, int index, child) |
Adds a child to the node that will be added at the next open position. More... | |
def | get_child (self, int index) |
Gets a child at particular index. More... | |
dict | get_data_structure_representation (self) |
Get the hierarchical JSON of the tree representation (internal use only) More... | |
Public Member Functions inherited from bridges.element.Element | |
object | value (self) |
Getter for the value this element is holding. More... | |
None | value (self, val) |
Setter for the value of an element. More... | |
str | identifier (self) |
Getter for the element identifier. More... | |
None | identifier (self, int id) |
Setter for the element identifier. More... | |
ElementVisualizer | visualizer (self) |
Getter for the element visualizer. More... | |
None | visualizer (self, ElementVisualizer vis) |
Setter function for this element visualizer. More... | |
LinkVisualizer | get_link_visualizer (self, el) |
None | set_link_visualizer (self, el) |
Setter for the link visualizer of this element. More... | |
None | remove_link_visualizer (self, el) |
Deleter function for the lik visualizer of this element. More... | |
def | label (self) |
Getter for the element's label. More... | |
def | label (self, label) |
Setter for the element's label. More... | |
def | size (self) |
Getter for the element's size. More... | |
def | size (self, sz) |
Setter for the element's size. More... | |
def | color (self) |
Getter for the element's color. More... | |
def | color (self, col) |
Setter for the element's size. More... | |
def | opacity (self) |
Getter for the element's opacity. More... | |
def | opacity (self, op) |
Setter for the element's opacity. More... | |
def | shape (self) |
Getter for the element's shape type. More... | |
def | shape (self, shp) |
Setter for the element's shape. More... | |
int | id (self) |
Get numer of ids of element object. More... | |
def | set_location (self, locX, locY) |
Setter for the element's location. More... | |
def | get_locationX (self) |
Getter for the element's location in X. More... | |
def | get_locationY (self) |
Getter for the element's location in Y. More... | |
def | get_element_representation (self) |
Getter for the element's JSON representation (for internal use) More... | |
def | get_link_representation (self, lv, src, dest) |
Getter for the JSON representation of the element's link (for internal use) More... | |
Public Attributes | |
children | |
Public Attributes inherited from bridges.element.Element | |
color | |
opacity | |
Static Public Attributes | |
string | QUOTE = "\"" |
string | COMMA = "," |
string | COLON = ":" |
string | OPEN_CURLY = "{" |
string | CLOSE_CURLY = "}" |
string | OPEN_PAREN = "(" |
string | CLOSE_PAREN = ")" |
string | OPEN_BOX = "[" |
string | CLOSE_BOX = "]" |
Static Public Attributes inherited from bridges.element.Element | |
int | ids = 0 |
None bridges.tree_element.TreeElement.__init__ | ( | self, | |
** | kwargs | ||
) |
Constructor for Tree Element.
(0): The label for the tree element that shows in visualization (1): the generic object 'e' that the tree element will hold (2): the tree element assigned to child 0 (3): the tree element assigned to child 1
Reimplemented from bridges.element.Element.
Reimplemented in bridges.kd_tree_element.KDTreeElement, bridges.bst_element.BSTElement, and bridges.bin_tree_element.BinTreeElement.
None bridges.tree_element.TreeElement.add_child | ( | self, | |
child | |||
) |
Adds a child to this parent node.
child | the child node to add |
def bridges.tree_element.TreeElement.get_child | ( | self, | |
int | index | ||
) |
Gets a child at particular index.
index | index to get child |
ValueError | if the index is higher than the number of children |
dict bridges.tree_element.TreeElement.get_data_structure_representation | ( | self | ) |
Get the hierarchical JSON of the tree representation (internal use only)
str bridges.tree_element.TreeElement.get_data_structure_type | ( | self | ) |
Gets the data structure type.
Reimplemented from bridges.element.Element.
Reimplemented in bridges.kd_tree_element.KDTreeElement, bridges.bst_element.BSTElement, bridges.bin_tree_element.BinTreeElement, and bridges.avl_tree_element.AVLTreeElement.
int bridges.tree_element.TreeElement.get_number_of_children | ( | self | ) |
Get the number of children at this node.
None bridges.tree_element.TreeElement.set_child | ( | self, | |
int | index, | ||
child | |||
) |
Adds a child to the node that will be added at the next open position.
index | index to add child |
child | child to add to tree |
ValueError | If the index is higher than the number of children |
bridges.tree_element.TreeElement.children |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |