Bridges-Python 3.5.1
Bridges(Python API)
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
bridges.circ_dl_element.CircDLelement Class Reference

This class can be used to instantiate Circular Doubly Linked List Elements. More...

Inheritance diagram for bridges.circ_dl_element.CircDLelement:
bridges.dl_element.DLelement bridges.sl_element.SLelement bridges.element.Element

Public Member Functions

None __init__ (self, **kwargs)
 Constructor for an Circularly Doubly Linked Element.
 
str get_data_structure_type (self)
 Gets the data structure type.
 
 iterator (self)
 list iterator to be used with range loops
 
 reverse_iterator (self)
 list reverse iterator to be used with range loops
 
- Public Member Functions inherited from bridges.dl_element.DLelement
dict get_data_structure_representation (self)
 Getter for the json representation of this list.
 
- Public Member Functions inherited from bridges.sl_element.SLelement
 list_helper (start)
 helper method for graph adjacency list
 
 get_list_elements (self, nodes)
 Get the elements of the list (for internal use only)
 
- 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)
 

Properties

 next = property
 Getter for the next element of this CircDLelement.
 
 prev = property
 Getter for the prev element of this CircDLelement.
 
- Properties inherited from bridges.dl_element.DLelement
- Properties inherited from bridges.sl_element.SLelement
 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
 
- Protected Attributes inherited from bridges.dl_element.DLelement
 _next
 
 _prev
 
- Protected Attributes inherited from bridges.sl_element.SLelement
 _next
 
- Protected Attributes inherited from bridges.element.Element
 _link_visualizer
 
 _ids
 
 _identifier
 
 _visualizer
 
 _value
 
 _label
 

Detailed Description

This class can be used to instantiate Circular Doubly Linked List Elements.

Structurally they are the same as doubly linked elements except that each node constructed with the next and the previous pointers points to itself.

User's implementation of the circularly linked list needs to ensure that the last node's next pointer points to the first node and the first node's previous pointer points to the last node, as the visualization generation is dependent on this.

Elements have labels (string) that are displayed on the visualization. Elements take an generic object E as a user defined parameter, which can be any native type or object.

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, between the element and its previous or next nodes.

Author
Kalpathi Subramanian, Mathhew McQuaigue
Date
7/17/16, 1/16/17 7/23/19, 2021

Circular doubly linked list tutorial: https://bridgesuncc.github.io/tutorials/CircularDoublyLinkedList.html

Constructor & Destructor Documentation

◆ __init__()

None bridges.circ_dl_element.CircDLelement.__init__ (   self,
**  kwargs 
)

Constructor for an Circularly Doubly Linked Element.

Parameters
labelTHe label for this CircDLelement
ethe generic element object that this CircDLelement will hold
nextthe next DLelement that should be assigned to the next pointer
prevTHe previous DLelement that should be assigned to the next pointer
Returns
None

Reimplemented from bridges.dl_element.DLelement.

Member Function Documentation

◆ get_data_structure_type()

str bridges.circ_dl_element.CircDLelement.get_data_structure_type (   self)

Gets the data structure type.

Returns
None

Reimplemented from bridges.dl_element.DLelement.

◆ iterator()

bridges.circ_dl_element.CircDLelement.iterator (   self)

list iterator to be used with range loops

Reimplemented from bridges.sl_element.SLelement.

◆ reverse_iterator()

bridges.circ_dl_element.CircDLelement.reverse_iterator (   self)

list reverse iterator to be used with range loops

Reimplemented from bridges.dl_element.DLelement.

Property Documentation

◆ next

bridges.circ_dl_element.CircDLelement.next = property
static

Getter for the next element of this CircDLelement.

Returns
DLelement the following element

◆ prev

bridges.circ_dl_element.CircDLelement.prev = property
static

Getter for the prev element of this CircDLelement.

Returns
DLelement the prev element in the list

The documentation for this class was generated from the following file: