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

The GraphAdjList class can be used to represent adjacency list based graphs in BRIDGES with E represnting a data specific generic parameter. The class is simply a wrapper around the C++ STL unordered_map class and, thus, derives all its operations from it. BRIDGES provides methods to visualize the graph and its contents. More...

Inheritance diagram for bridges.base.GraphAdjList< K, E >:
bridges.base.DataStruct

Public Member Functions

 GraphAdjList ()
 
String getDataStructType ()
 
void addVertex (K k, E e)
 
void addEdge (K src, K dest, int weight)
 
HashMap< K, Element< E > > getVertices ()
 
HashMap< K, SLelement< Edge< K > > > getAdjacencyList ()
 
SLelement< Edge< K > > getAdjacencyList (K vertex)
 

Additional Inherited Members

- Protected Member Functions inherited from bridges.base.DataStruct
abstract String getDataStructType ()
 
- Protected Attributes inherited from bridges.base.DataStruct
String QUOTE = "\""
 

Detailed Description

The GraphAdjList class can be used to represent adjacency list based graphs in BRIDGES with E represnting a data specific generic parameter. The class is simply a wrapper around the C++ STL unordered_map class and, thus, derives all its operations from it. BRIDGES provides methods to visualize the graph and its contents.

Author
Kalpathi Subramanian
Date
6/29/15
Parameters
Element<E>

Constructor & Destructor Documentation

Constructor

Member Function Documentation

void bridges.base.GraphAdjList< K, E >.addEdge ( src,
dest,
int  weight 
)

Adds a new edge to the graph, adds it to that vertex's adjacency list; user is responsible for checking if the vertex already exists.

Parameters
src- source vertex of edge
dest- destination vertex of edge
weight- edge weight
Returns
none
void bridges.base.GraphAdjList< K, E >.addVertex ( k,
e 
)

Adds a new vertex to the graph, initializes the adjacency list; user is responsible for checking if the vertex already exists. This method will replace the value for this key

Parameters
K- vertex key value
Returns
none
HashMap<K, SLelement<Edge<K> > > bridges.base.GraphAdjList< K, E >.getAdjacencyList ( )

Gets the adjacency list (of type SLelement<Edge> )

Returns
- the graph's adjacency lists
SLelement<Edge<K> > bridges.base.GraphAdjList< K, E >.getAdjacencyList ( vertex)

Gets the adjacency list (of type SLelement<Edge> of a vertex)

Parameters
-vertex key
Returns
- the graph's adjacency list corresponding to this vertex
String bridges.base.GraphAdjList< K, E >.getDataStructType ( )

This method gets the data structure type

Returns
The date structure type as a string
HashMap<K, Element<E> > bridges.base.GraphAdjList< K, E >.getVertices ( )

This method returns the graph nodes

Returns
– vertices held in an unordered map

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