Bridges-Python
3.4.4
Bridges(Python API)
|
This class can be used to instantiate Singly Linked Elements.
This class extends Element and takes a generic parameter <E> representing application specific data. This element forms the basic building block for singly linked lists. Singly linked elements have a field pointing to the next element along the list.
Elements contain a visualizer (ElementVisualizer) object for setting visual attributes (color, shape, opacity, size), necessary for displaying them in a web browser.
Elements also have a LinkVisualizer object, that is used when they are linked to another element, appropriate for setting link attributes, for instance, between the current element and its next element.
Public Member Functions | |
None | __init__ (self, **kwargs) |
Conctructor for SLelement object. More... | |
str | get_data_structure_type (self) |
Getter for the data structure type. More... | |
def | next (self) |
Getter for element following this element. More... | |
None | next (self, n) |
Setter for the element following this element. More... | |
def | value (self) |
Getter for the SLelement value to hold. More... | |
def | value (self, val) |
Setter for the value that this SLelement will hold. More... | |
def | list_helper (start) |
helper method for graph adjacency list More... | |
dict | get_data_structure_representation (self) |
Getter for this data structure representation. More... | |
def | get_list_elements (self, nodes) |
Get the elements of the list (for internal use only) More... | |
def | iterator (self) |
used for range loops More... | |
Public Member Functions inherited from bridges.element.Element | |
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... | |
Additional Inherited Members | |
Public Attributes inherited from bridges.element.Element | |
color | |
opacity | |
Static Public Attributes inherited from bridges.element.Element | |
int | ids = 0 |
None bridges.sl_element.SLelement.__init__ | ( | self, | |
** | kwargs | ||
) |
Conctructor for SLelement object.
(Generic) e: the generic object that this SLelement will hold (str) label: the label of the SLelement that shows up on the bridges visualization (Element) next: the element that should be assigned to the next pointer
Reimplemented from bridges.element.Element.
Reimplemented in bridges.ml_element.MLelement, bridges.circ_sl_element.CircSLelement, and bridges.circ_dl_element.CircDLelement.
dict bridges.sl_element.SLelement.get_data_structure_representation | ( | self | ) |
Getter for this data structure representation.
Reimplemented in bridges.ml_element.MLelement, and bridges.dl_element.DLelement.
str bridges.sl_element.SLelement.get_data_structure_type | ( | self | ) |
Getter for the data structure type.
Reimplemented from bridges.element.Element.
Reimplemented in bridges.ml_element.MLelement, bridges.dl_element.DLelement, bridges.circ_sl_element.CircSLelement, and bridges.circ_dl_element.CircDLelement.
def bridges.sl_element.SLelement.get_list_elements | ( | self, | |
nodes | |||
) |
Get the elements of the list (for internal use only)
nodes | a vector of the nodes in the list |
Reimplemented in bridges.ml_element.MLelement.
def bridges.sl_element.SLelement.iterator | ( | self | ) |
used for range loops
Reimplemented in bridges.circ_sl_element.CircSLelement, and bridges.circ_dl_element.CircDLelement.
def bridges.sl_element.SLelement.list_helper | ( | start | ) |
helper method for graph adjacency list
def bridges.sl_element.SLelement.next | ( | self | ) |
Getter for element following this element.
Reimplemented in bridges.ml_element.MLelement, bridges.dl_element.DLelement, bridges.circ_sl_element.CircSLelement, and bridges.circ_dl_element.CircDLelement.
None bridges.sl_element.SLelement.next | ( | self, | |
n | |||
) |
Setter for the element following this element.
n | the element to be assigned to next |
Reimplemented in bridges.circ_dl_element.CircDLelement, bridges.ml_element.MLelement, bridges.circ_sl_element.CircSLelement, and bridges.dl_element.DLelement.
def bridges.sl_element.SLelement.value | ( | self | ) |
def bridges.sl_element.SLelement.value | ( | self, | |
val | |||
) |
Setter for the value that this SLelement will hold.
val | the value that this SLelment will hold |
Reimplemented from bridges.element.Element.