Bridges-Java  3.4.2
Bridges(Java API)
Public Member Functions | List of all members
bridges.base.Edge< K, E2 > Class Template Reference

Detailed Description

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

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.

See also
the tutorial on using graphs in BRIDGES: https://bridgesuncc.github.io/tutorials/Graph.html and https://bridgesuncc.github.io/tutorials/Graph_AM.html
Author
Kalpathi Subramanian
Parameters
Kholds the terminating vertex of the edge
E2holds edge specific information

Public Member Functions

 Edge (K from, K to, E2 data, LinkVisualizer lvis)
 Construct an edge using each extremities, user data, and styling information. More...
 
 Edge (K from, K to, E2 data)
 Construct an edge using each extremities, user data. More...
 
void setFrom (K from)
 Set source Element (Vertex) of the edge. More...
 
void setTo (K to)
 Set identifier of the terminating Element (Vertex) of edge. More...
 
getTo ()
 Get identifer of the terminating Element of edge. More...
 
getFrom ()
 
void setEdgeData (E2 data)
 
E2 getEdgeData ()
 
LinkVisualizer getLinkVisualizer ()
 
void setLinkVisualizer (LinkVisualizer lvis)
 Set the edge's link visualizer. More...
 
String getLabel ()
 Get the edge's label. More...
 
void setLabel (String label)
 Set the edge's label. More...
 
double getThickness ()
 Get the thickness of the edge. More...
 
void setThickness (double thickness)
 Set the thickness of the edge. More...
 
Color getColor ()
 Get the color of the link in the Bridges Visualization. More...
 
void setColor (Color color)
 Set the color of the link from an existing Color object. More...
 
void setColor (String color)
 Set the color of the link in the Bridges Visualization. More...
 
void setColor (int r, int g, int b, float a)
 Set the color of the link given RGBA components. More...
 

Constructor & Destructor Documentation

◆ Edge() [1/2]

bridges.base.Edge< K, E2 >.Edge ( from,
to,
E2  data,
LinkVisualizer  lvis 
)

Construct an edge using each extremities, user data, and styling information.

Parameters
fromkey of source vertex of the edge
tokey of terminating vertex of the edge
datais the edge information object
lvisis the object storing styling information for the edge

◆ Edge() [2/2]

bridges.base.Edge< K, E2 >.Edge ( from,
to,
E2  data 
)

Construct an edge using each extremities, user data.

Parameters
fromkey of source vertex of the edge
tokey of terminating vertex of the edge
datais the edge information object

Member Function Documentation

◆ getColor()

Color bridges.base.Edge< K, E2 >.getColor ( )

Get the color of the link in the Bridges Visualization.

Returns
the edge color

◆ getEdgeData()

E2 bridges.base.Edge< K, E2 >.getEdgeData ( )

Get edge specific data.

Returns
edge data

◆ getFrom()

K bridges.base.Edge< K, E2 >.getFrom ( )

Get identifer of the source Element of edge

Returns
the identifier of the source Element

◆ getLabel()

String bridges.base.Edge< K, E2 >.getLabel ( )

Get the edge's label.

Returns
label of this edge

◆ getLinkVisualizer()

LinkVisualizer bridges.base.Edge< K, E2 >.getLinkVisualizer ( )

Get the edge's link visualizer

Returns
link visualizer for this edge

◆ getThickness()

double bridges.base.Edge< K, E2 >.getThickness ( )

Get the thickness of the edge.

Returns
the size in pixels of the edge

◆ getTo()

K bridges.base.Edge< K, E2 >.getTo ( )

Get identifer of the terminating Element of edge.

Returns
the identifier of the terminating Element (vertex)

◆ setColor() [1/3]

void bridges.base.Edge< K, E2 >.setColor ( Color  color)

Set the color of the link from an existing Color object.

Parameters
colorthe edge color to be assigned

◆ setColor() [2/3]

void bridges.base.Edge< K, E2 >.setColor ( int  r,
int  g,
int  b,
float  a 
)

Set the color of the link given RGBA components.

Parameters
rred component
ggreen component
bblue component
aalpha (transparency) component

◆ setColor() [3/3]

void bridges.base.Edge< K, E2 >.setColor ( String  color)

Set the color of the link in the Bridges Visualization.

Parameters
colorthe string reprsenting the color. See the Color class for the complete set of supported colors.

◆ setEdgeData()

void bridges.base.Edge< K, E2 >.setEdgeData ( E2  data)

Set edge specific data.

Parameters
dataedge data

◆ setFrom()

void bridges.base.Edge< K, E2 >.setFrom ( from)

Set source Element (Vertex) of the edge.

Parameters
fromthe identifier of the source Element (Vertex)

◆ setLabel()

void bridges.base.Edge< K, E2 >.setLabel ( String  label)

Set the edge's label.

Parameters
labelthe label to be assigned

◆ setLinkVisualizer()

void bridges.base.Edge< K, E2 >.setLinkVisualizer ( LinkVisualizer  lvis)

Set the edge's link visualizer.

Parameters
lvislink visualizer to be set for this edge

◆ setThickness()

void bridges.base.Edge< K, E2 >.setThickness ( double  thickness)

Set the thickness of the edge.

Parameters
thicknessedge thickness to set

◆ setTo()

void bridges.base.Edge< K, E2 >.setTo ( to)

Set identifier of the terminating Element (Vertex) of edge.

Parameters
tothe identifier of the terminating Element (Vertex)

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