![]() |
Bridges-Python 3.5.0-dev1
Bridges(Python API)
|
This class can be used to instantiate Singly Linked Circular List Elements. More...
Public Member Functions | |
None | __init__ (self, **kwargs) |
The constructor for a Circular Singly Linked Element. | |
str | get_data_structure_type (self) |
Gets the data structure type. | |
iterator (self) | |
list iterator for use in range loops | |
![]() | |
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) | |
![]() | |
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) | |
Properties | |
next = property | |
Getter for the next element of this CircSLelement. | |
![]() | |
value = property | |
Getter for the SLelement value to hold. | |
![]() | |
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 | |
![]() | |
int | ids = 0 |
![]() | |
_next | |
![]() | |
_link_visualizer | |
_ids | |
_identifier | |
_visualizer | |
_value | |
_label | |
This class can be used to instantiate Singly Linked Circular List Elements.
Structurally they are the same as singly linked elements except that each node constructed with the next point pointing to itself; User's implementation of the circularly linked list needs to ensure that the last node points to first node of the list, as the visualization generation is dependent on this.
Elements have labels (string) that are displayed on the visualization. Elements take an generic object as a user defined parameter, E, which can be any native type or object.
Elements contains 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, between an element and its next element.
Circular singly linked list tutorial: https://bridgesuncc.github.io/tutorials/CircularSinglyLinkedList.html
None bridges.circ_sl_element.CircSLelement.__init__ | ( | self, | |
** | kwargs | ||
) |
The constructor for a Circular Singly Linked Element.
e | the generic object that this CircSLelement will hold |
label | The label of this CircSLelement |
next | The CircSLelement that should be assigned to the next pointer |
Reimplemented from bridges.sl_element.SLelement.
str bridges.circ_sl_element.CircSLelement.get_data_structure_type | ( | self | ) |
Gets the data structure type.
Reimplemented from bridges.sl_element.SLelement.
bridges.circ_sl_element.CircSLelement.iterator | ( | self | ) |
list iterator for use in range loops
Reimplemented from bridges.sl_element.SLelement.
|
static |
Getter for the next element of this CircSLelement.