![]() |
Bridges-Python 3.5.1
Bridges(Python API)
|
This class can be used to instantiate Singly Linked Elements. More...
Public Member Functions | |
| None | __init__ (self, **kwargs) |
| Conctructor for SLelement object. | |
| str | get_data_structure_type (self) |
| Getter for the data structure type. | |
| list_helper (start) | |
| helper method for graph adjacency list | |
| dict | get_data_structure_representation (self) |
| Getter for this data structure representation. | |
| get_list_elements (self, nodes) | |
| Get the elements of the list (for internal use only) | |
| iterator (self) | |
| used for range loops | |
Public Member Functions inherited from bridges.element.Element | |
| LinkVisualizer | get_link_visualizer (self, el) |
| Getter for the link visualizer object that links this element to another element specified by the argument. | |
| None | set_link_visualizer (self, el) |
| Setter for the link visualizer of this element. | |
| None | remove_link_visualizer (self, el) |
| Deleter function for the lik visualizer of this element. | |
| set_location (self, locX, locY) | |
| Setter for the element's location. | |
| get_locationX (self) | |
| Getter for the element's location in X. | |
| get_locationY (self) | |
| Getter for the element's location in Y. | |
| get_element_representation (self) | |
| Getter for the element's JSON representation (for internal use) | |
| get_link_representation (self, lv, src, dest) | |
| Getter for the JSON representation of the element's link (for internal use) | |
Protected Attributes | |
| _next | |
Protected Attributes inherited from bridges.element.Element | |
| _link_visualizer | |
| _ids | |
| _identifier | |
| _visualizer | |
| _value | |
| _label | |
Properties | |
| next = property | |
| Getter for element following this element. | |
| value = property | |
| Getter for the SLelement value to hold. | |
Properties inherited from bridges.element.Element | |
| identifier = property | |
| Getter for the element identifier. | |
| visualizer = property | |
| Getter for the element visualizer. | |
| label = property | |
| Getter for the element's label. | |
| size = property | |
| Getter for the element's size. | |
| color = property | |
| Getter for the element's color. | |
| opacity = property | |
| Getter for the element's opacity. | |
| shape = property | |
| Getter for the element's shape type. | |
| id = property | |
| Get numer of ids of element object. | |
Additional Inherited Members | |
Static Public Attributes inherited from bridges.element.Element | |
| int | ids = 0 |
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.
| 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.circ_dl_element.CircDLelement, bridges.circ_sl_element.CircSLelement, bridges.ml_element.MLelement, and bridges.dl_element.DLelement.
| dict bridges.sl_element.SLelement.get_data_structure_representation | ( | self | ) |
Getter for this data structure representation.
Reimplemented in bridges.dl_element.DLelement, and bridges.ml_element.MLelement.
| str bridges.sl_element.SLelement.get_data_structure_type | ( | self | ) |
Getter for the data structure type.
Reimplemented from bridges.element.Element.
Reimplemented in bridges.circ_dl_element.CircDLelement, bridges.circ_sl_element.CircSLelement, bridges.dl_element.DLelement, and bridges.ml_element.MLelement.
| 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.
| bridges.sl_element.SLelement.iterator | ( | self | ) |
used for range loops
Reimplemented in bridges.circ_dl_element.CircDLelement, and bridges.circ_sl_element.CircSLelement.
| bridges.sl_element.SLelement.list_helper | ( | start | ) |
helper method for graph adjacency list
|
protected |
|
static |
Getter for element following this element.
|
static |
Getter for the SLelement value to hold.