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

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

Public Member Functions

 Edge ()
 
 Edge (int wt)
 
 Edge (int wt, K v)
 
 Edge (int wt, K v, E2 e)
 
void setWeight (int wt)
 
int getWeight ()
 
void setVertex (K v)
 
getVertex ()
 
void setEdgeData (E2 data)
 
E2 getEdgeData ()
 
void setEdge (int wt, K v)
 
Edge< K, E2 > getEdge ()
 

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
K.R. Subramanian
Parameters
genericparameter <K> holds the terminating vertex of the edge
genericparameter <E2> holds edge specific information

Constructor & Destructor Documentation

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

Constructors

bridges.base.Edge< K, E2 >.Edge ( int  wt)

Construct an edge with weight equal to "wt" and no terminating Element

  • used only for graphs.
    Parameters
    wtinteger representing the weight of the edge
bridges.base.Edge< K, E2 >.Edge ( int  wt,
v 
)

Construct an edge with weight "wt" and a terminating Element with an identifer equal to "v" - used only for graphs

Parameters
wtinteger, representing edge weight
vthe terminating vertex of the edge
bridges.base.Edge< K, E2 >.Edge ( int  wt,
v,
E2  e 
)

Construct an edge with weight "wt" and a terminating Element with an identifer equal to "v" - used only for graphs

Parameters
wtinteger, representing edge weight
vthe terminating vertex of the edge
dis the edge information object

Member Function Documentation

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

Returns this edge

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

Get edge specific data.

Returns
edge data
K bridges.base.Edge< K, E2 >.getVertex ( )

Get identifer of the terminating Element of edge

Returns
the string identifier of the terminating Element
int bridges.base.Edge< K, E2 >.getWeight ( )

Get edge weight

Returns
the weight of edge
void bridges.base.Edge< K, E2 >.setEdge ( int  wt,
v 
)

Set edge to weight of "wt" and terminating Elememt of "v".

Parameters
wtedge weight
vthe identifier of the terminating Element
void bridges.base.Edge< K, E2 >.setEdgeData ( E2  data)

Set edge specific data.

Parameters
dataedge data
void bridges.base.Edge< K, E2 >.setVertex ( v)

Set terminating Element of the edge

Parameters
vthe identifier of the terminating Element
void bridges.base.Edge< K, E2 >.setWeight ( int  wt)

Set edge weight to "wt"

Parameters
wt- graph edge weight

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