Bridges-Python-3.0.2  3.0.2
Bridges(PythonAPI)
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
bridges.element.Element Class Reference
Inheritance diagram for bridges.element.Element:
bridges.sl_element.SLelement bridges.tree_element.TreeElement bridges.circ_sl_element.CircSLelement bridges.dl_element.DLelement bridges.ml_element.MLelement bridges.bin_tree_element.BinTreeElement bridges.circ_dl_element.CircDLelement bridges.bst_element.BSTElement bridges.avl_tree_element.AVLTreeElement bridges.kd_tree_element.KDTreeElement

Detailed Description

This is the main superclass in BRIDGES for deriving a number of elements used in building data structures, viz., arrays, lists, trees and graphs.

SLelement, DLelement, CircSLelement, CircDLelement, MLelement, TreeElement, BinTreeElement, BSTElement, AVLTreeElement and KDTreeElement are all subclasses (see class hierarchy above). Element contains two visualizer objects (ElementVisualizer, LinkVisualizer) for specifying visual attributes for nodes and links respectively. It also contains a label that that can be displayed in BRIDGES visualizations.

All the tutorials under

http://bridgesuncc.github.io/tutorials/Overview.html

illustrate examples of using different types of Element objects and how to manipulate their visual attributes.

Author
Matthew Mcquaigue, Kalpathi Subramanian

2017, 2018, 6/24/19

Public Member Functions

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

 color
 
 opacity
 

Static Public Attributes

int ids = 0
 

Constructor & Destructor Documentation

◆ __init__()

def bridges.element.Element.__init__ (   self,
  kwargs,
  None 
)

Member Function Documentation

◆ color() [1/2]

def bridges.element.Element.color (   self)

Getter for the element's color.

Returns
Color element's color

◆ color() [2/2]

def bridges.element.Element.color (   self,
  col 
)

Setter for the element's size.

Parameters
colthe element's color
Returns
None

◆ get_data_structure_type()

def bridges.element.Element.get_data_structure_type (   self,
  str 
)

Get the data structure representation.

Returns
str representing the data structure type

◆ get_element_representation()

def bridges.element.Element.get_element_representation (   self)

Getter for the element's JSON representation (for internal use)

Returns
str JSON of element

◆ get_link_representation()

def bridges.element.Element.get_link_representation (   self,
  lv,
  src,
  dest 
)

Getter for the JSON representation of the element's link (for internal use)

Parameters
lvlink visualizer
srcsource vertex of link
destdestination vertex of link
Returns
str JSON of element's link from src to dest

◆ get_link_visualizer()

def bridges.element.Element.get_link_visualizer (   self,
  el,
  LinkVisualizer 
)

◆ get_locationX()

def bridges.element.Element.get_locationX (   self)

Getter for the element's location in X.

Returns
float X coordinate of element's location

◆ get_locationY()

def bridges.element.Element.get_locationY (   self)

Getter for the element's location in Y.

Returns
float Y coordinate of element's location

◆ id()

def bridges.element.Element.id (   self,
  int 
)

◆ identifier() [1/2]

def bridges.element.Element.identifier (   self,
  str 
)

Getter for the element identifier.

Return
str element identifier (for internal use)

◆ identifier() [2/2]

def bridges.element.Element.identifier (   self,
  id 
)

Setter for the element identifier.

Parameters
intthe identifier (for internal use)
Returns
None

◆ label() [1/2]

def bridges.element.Element.label (   self)

Getter for the element's label.

Returns
str the element's label

◆ label() [2/2]

def bridges.element.Element.label (   self,
  label 
)

Setter for the element's label.

Parameters
strthe element's label
Returns
None

◆ opacity() [1/2]

def bridges.element.Element.opacity (   self)

Getter for the element's opacity.

Returns
float element size (0-1.0)

◆ opacity() [2/2]

def bridges.element.Element.opacity (   self,
  op 
)

Setter for the element's opacity.

Parameters
opthe element's size (0-1.0)
Returns
None

◆ remove_link_visualizer()

def bridges.element.Element.remove_link_visualizer (   self,
  el,
  None 
)

Deleter function for the lik visualizer of this element.

(Element) el: the terminating element of the link; the link visualizer for this link will be deleted

Returns
None

◆ set_link_visualizer()

def bridges.element.Element.set_link_visualizer (   self,
  el,
  None 
)

Setter for the link visualizer of this element.

(Element) el: the terminating element of this link; creates a new link visualizer for this link

Returns
None

◆ set_location()

def bridges.element.Element.set_location (   self,
  locX,
  locY 
)

Setter for the element's location.

Parameters
locXthe element's location in X
locYthe element's location in Y
Returns
None

◆ shape() [1/2]

def bridges.element.Element.shape (   self)

Getter for the element's shape type.

Returns
element shape

◆ shape() [2/2]

def bridges.element.Element.shape (   self,
  shp 
)

Setter for the element's shape.

Parameters
shpthe element's size (0-1.0)
Returns
None

◆ size() [1/2]

def bridges.element.Element.size (   self)

Getter for the element's size.

Returns
int element size (0-50)

◆ size() [2/2]

def bridges.element.Element.size (   self,
  sz 
)

Setter for the element's size.

Parameters
szthe element's size (0-50)
Returns
None

◆ value() [1/2]

def bridges.element.Element.value (   self,
  object 
)

Getter for the value this element is holding.

Returns
generic object (application specific)

◆ value() [2/2]

def bridges.element.Element.value (   self,
  val,
  None 
)

Setter for the value of an element.

Parameters
valthe value (generic, application specific object) this element will hold
Returns
None

◆ visualizer() [1/2]

def bridges.element.Element.visualizer (   self,
  ElementVisualizer 
)

Getter for the element visualizer.

Returns
ElementVisualizer

◆ visualizer() [2/2]

def bridges.element.Element.visualizer (   self,
  vis 
)

Setter function for this element visualizer.

Parameters
visthe element visualizer
Returns
None

Member Data Documentation

◆ color

bridges.element.Element.color

◆ ids

int bridges.element.Element.ids = 0
static

◆ opacity

bridges.element.Element.opacity

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