Bridges-Python  3.4.4
Bridges(Python API)
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

Public Member Functions

str get_data_structure_type (self)
 Get the data structure representation. More...
 
None __init__ (self, **kwargs)
 Element constructor. More...
 
object value (self)
 Getter for the value this element is holding. More...
 
None value (self, val)
 Setter for the value of an element. More...
 
str identifier (self)
 Getter for the element identifier. More...
 
None identifier (self, int id)
 Setter for the element identifier. More...
 
ElementVisualizer visualizer (self)
 Getter for the element visualizer. More...
 
None visualizer (self, ElementVisualizer vis)
 Setter function for this element visualizer. More...
 
LinkVisualizer get_link_visualizer (self, el)
 
None set_link_visualizer (self, el)
 Setter for the link visualizer of this element. More...
 
None 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...
 
int id (self)
 Get numer of ids of element object. More...
 
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__()

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

Element constructor.

Creates an Element Visualizer and unique identifier for the current element.

       (0) : "label" - the string label that is visible on the bridges Visualization
       (1) : "value" - data value (or object) E  used to construct Element
       (2) : "original" - element object to copy (if named "original")
       (3) : "color"  - color of element
       (4) : "opacity" - opacity of element
Returns
None

Reimplemented in bridges.tree_element.TreeElement, bridges.sl_element.SLelement, bridges.ml_element.MLelement, bridges.kd_tree_element.KDTreeElement, bridges.circ_sl_element.CircSLelement, bridges.circ_dl_element.CircDLelement, bridges.bst_element.BSTElement, and bridges.bin_tree_element.BinTreeElement.

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()

str bridges.element.Element.get_data_structure_type (   self)

◆ 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

Reimplemented in bridges.kd_tree_element.KDTreeElement, bridges.bst_element.BSTElement, and bridges.avl_tree_element.AVLTreeElement.

◆ 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()

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

◆ 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()

int bridges.element.Element.id (   self)

Get numer of ids of element object.

Returns
(int) number of ids of element

◆ identifier() [1/2]

str bridges.element.Element.identifier (   self)

Getter for the element identifier.

Return
str element identifier (for internal use)

◆ identifier() [2/2]

None bridges.element.Element.identifier (   self,
int  id 
)

Setter for the element identifier.

Parameters
idthe 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
labelthe 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()

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

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()

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

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
float 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]

object bridges.element.Element.value (   self)

Getter for the value this element is holding.

Returns
generic object (application specific)

Reimplemented in bridges.sl_element.SLelement.

◆ value() [2/2]

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

Setter for the value of an element.

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

Reimplemented in bridges.sl_element.SLelement.

◆ visualizer() [1/2]

ElementVisualizer bridges.element.Element.visualizer (   self)

Getter for the element visualizer.

Returns
ElementVisualizer

◆ visualizer() [2/2]

None bridges.element.Element.visualizer (   self,
ElementVisualizer  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: