Bridges-Python
3.4.4
Bridges(Python API)
|
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
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 | |
None bridges.edge.Edge.__init__ | ( | self, | |
v1, | |||
v2, | |||
data = None , |
|||
str | label = None , |
||
Color | color = None , |
||
float | thickness = None |
||
) |
Constructor for a edge.
v1 | first vertex of the edge |
v2 | second vertex of the edge |
data | the data the edge will hold |
label | edge label |
color | edge color |
thickness | edge thickness |
def bridges.edge.Edge.color | ( | self | ) |
Getter for edge color.
def bridges.edge.Edge.color | ( | self, | |
color | |||
) |
Setter for edge color.
color | color to be set (see link visualizer class for setting options) |
def bridges.edge.Edge.destination | ( | self | ) |
Getter for the to vertex.
def bridges.edge.Edge.edge_data | ( | self | ) |
Getter for edge data.
None bridges.edge.Edge.edge_data | ( | self, | |
data | |||
) |
Setter for edge data.
data | data for the edge to hold (generic object) |
def bridges.edge.Edge.fromv | ( | self | ) |
Getter for the from vertex.
def bridges.edge.Edge.get_edge | ( | self | ) |
Get this edge object.
def bridges.edge.Edge.label | ( | self | ) |
Getter for the edge label.
def bridges.edge.Edge.label | ( | self, | |
l | |||
) |
Setter for the edge label.
l | lavel value (string) to set |
def bridges.edge.Edge.opacity | ( | self | ) |
Getter for the edge opacity.
def bridges.edge.Edge.opacity | ( | self, | |
opacity | |||
) |
Setter for the edge opacity.
opacity | opacity value (0-1.0) to set |
def bridges.edge.Edge.source | ( | self | ) |
Getter for the from vertex.
float bridges.edge.Edge.thickness | ( | self | ) |
Getter for the link thickness.
None bridges.edge.Edge.thickness | ( | self, | |
float | th | ||
) |
Setter for the thickness of edge.
th | thickness to be applied (1.0-10.0 range) |
def bridges.edge.Edge.tov | ( | self | ) |
Getter for the to vertex.
bridges.edge.Edge.color |
bridges.edge.Edge.label |
bridges.edge.Edge.thickness |