Bridges-Python  3.4.4
Bridges(Python API)
Public Member Functions | Public Attributes | List of all members
bridges.edge.Edge Class Reference

Detailed Description

This class is used to represent the edges in a graph and will appear as links in the BRIDGES graph visualization.

This object is used in graphs and graph algorithms such as DFS, BFS and shortest path algorithms that need to visit graph edges. The adjacency list representation uses them as the generic paramter, as SLelement<Edge> bridges represents Edges as links between pairs of elements

Author
Matthew McQuaigue, Kalpathi Subramanian
Date
2019, 2020, 2021

Public Member Functions

None __init__ (self, v1, v2, data=None, str label=None, Color color=None, float thickness=None)
 Constructor for a edge. More...
 
def tov (self)
 Getter for the to vertex. More...
 
def fromv (self)
 Getter for the from vertex. More...
 
def destination (self)
 Getter for the to vertex. More...
 
def source (self)
 Getter for the from vertex. More...
 
float thickness (self)
 Getter for the link thickness. More...
 
None thickness (self, float th)
 Setter for the thickness of edge. More...
 
def edge_data (self)
 Getter for edge data. More...
 
None edge_data (self, data)
 Setter for edge data. More...
 
def color (self)
 Getter for edge color. More...
 
def color (self, color)
 Setter for edge color. More...
 
def opacity (self)
 Getter for the edge opacity. More...
 
def opacity (self, opacity)
 Setter for the edge opacity. More...
 
def label (self)
 Getter for the edge label. More...
 
def label (self, l)
 Setter for the edge label. More...
 
def get_edge (self)
 Get this edge object. More...
 

Public Attributes

 label
 
 color
 
 thickness
 

Constructor & Destructor Documentation

◆ __init__()

None bridges.edge.Edge.__init__ (   self,
  v1,
  v2,
  data = None,
str   label = None,
Color   color = None,
float   thickness = None 
)

Constructor for a edge.

Parameters
v1first vertex of the edge
v2second vertex of the edge
datathe data the edge will hold
labeledge label
coloredge color
thicknessedge thickness

Member Function Documentation

◆ color() [1/2]

def bridges.edge.Edge.color (   self)

Getter for edge color.

Returns
color of edge (see link visualizer class for setting options

◆ color() [2/2]

def bridges.edge.Edge.color (   self,
  color 
)

Setter for edge color.

Parameters
colorcolor to be set (see link visualizer class for setting options)
Returns
None

◆ destination()

def bridges.edge.Edge.destination (   self)

Getter for the to vertex.

Returns
vertex terminating vertex of edge

◆ edge_data() [1/2]

def bridges.edge.Edge.edge_data (   self)

Getter for edge data.

Returns
str data associated with this edge (generic object)

◆ edge_data() [2/2]

None bridges.edge.Edge.edge_data (   self,
  data 
)

Setter for edge data.

Parameters
datadata for the edge to hold (generic object)
Returns
None

◆ fromv()

def bridges.edge.Edge.fromv (   self)

Getter for the from vertex.

Returns
vertex source vertex of edge

◆ get_edge()

def bridges.edge.Edge.get_edge (   self)

Get this edge object.

Returns
self this edge object

◆ label() [1/2]

def bridges.edge.Edge.label (   self)

Getter for the edge label.

Returns
(string) : edge label

◆ label() [2/2]

def bridges.edge.Edge.label (   self,
  l 
)

Setter for the edge label.

Parameters
llavel value (string) to set
Returns
None

◆ opacity() [1/2]

def bridges.edge.Edge.opacity (   self)

Getter for the edge opacity.

Returns
opacity edge opacity

◆ opacity() [2/2]

def bridges.edge.Edge.opacity (   self,
  opacity 
)

Setter for the edge opacity.

Parameters
opacityopacity value (0-1.0) to set
Returns
None

◆ source()

def bridges.edge.Edge.source (   self)

Getter for the from vertex.

Returns
vertex source vertex of edge

◆ thickness() [1/2]

float bridges.edge.Edge.thickness (   self)

Getter for the link thickness.

Returns
float link thickness (1.0-10.0 range)

◆ thickness() [2/2]

None bridges.edge.Edge.thickness (   self,
float  th 
)

Setter for the thickness of edge.

Parameters
ththickness to be applied (1.0-10.0 range)
Returns
None

◆ tov()

def bridges.edge.Edge.tov (   self)

Getter for the to vertex.

Returns
vertex terminating vertex of edge

Member Data Documentation

◆ color

bridges.edge.Edge.color

◆ label

bridges.edge.Edge.label

◆ thickness

bridges.edge.Edge.thickness

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