![]() |
Bridges-Python-3.0.2
3.0.2
Bridges(PythonAPI)
|
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: http://bridgesuncc.github.io/tutorials/CircularSinglyLinkedList.html
Public Member Functions | |
def | __init__ (self, kwargs) |
The constructor for a Circular Singly Linked Element. More... | |
def | get_data_structure_type (self) |
Gets the data structure type. More... | |
def | next (self) |
Getter for the next element of this CircSLelement. More... | |
def | next (self, n) |
Setter for the next element in Circular list. More... | |
![]() | |
def | __init__ (self, kwargs) |
Conctructor for SLelement object. More... | |
def | get_data_structure_type (self) |
Getter for the data structure type. More... | |
def | next (self) |
Getter for element following this element. More... | |
def | 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) |
def | 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 | get_data_structure_type (self) |
Get the data structure representation. More... | |
def | __init__ (self, kwargs) |
def | value (self) |
Getter for the value this element is holding. More... | |
def | value (self, val) |
Setter for the value of an element. More... | |
def | identifier (self) |
Getter for the element identifier. More... | |
def | identifier |
Setter for the element identifier. More... | |
def | visualizer (self) |
Getter for the element visualizer. More... | |
def | visualizer |
Setter function for this element visualizer. More... | |
def | get_link_visualizer (self, el) |
def | set_link_visualizer (self, el) |
Setter for the link visualizer of this element. More... | |
def | 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... | |
def | id (self) |
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 | |
next | |
![]() | |
color | |
opacity | |
Additional Inherited Members | |
![]() | |
int | ids = 0 |
def bridges.circ_sl_element.CircSLelement.__init__ | ( | self, | |
kwargs, | |||
None | |||
) |
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 |
def bridges.circ_sl_element.CircSLelement.get_data_structure_type | ( | self, | |
str | |||
) |
Gets the data structure type.
def bridges.circ_sl_element.CircSLelement.next | ( | self | ) |
Getter for the next element of this CircSLelement.
def bridges.circ_sl_element.CircSLelement.next | ( | self, | |
n, | |||
None | |||
) |
Setter for the next element in Circular list.
n | the next element to be set |
bridges.circ_sl_element.CircSLelement.next |