Bridges-Java-2.2  2.2.0
Bridges(JavaAPI)
Public Member Functions | List of all members
bridges.base.GraphAdjMatrix< K, E > Class Template Reference
Inheritance diagram for bridges.base.GraphAdjMatrix< K, E >:
bridges.base.DataStruct

Public Member Functions

 GraphAdjMatrix (int size)
 
String getDataStructType ()
 
void addVertex (K k, E e)
 
void addEdge (K src, K dest, int weight)
 
HashMap< K, Element< E > > getVertices ()
 
HashMap< K, HashMap< K, Integer > > getAdjacencyMatrix ()
 

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 GraphAdjMatrix class can be used to represent adjacency matrix based graphs in BRIDGES, with T representing 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, 7/120/15

Constructor & Destructor Documentation

Constructor

Member Function Documentation

void bridges.base.GraphAdjMatrix< 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 vertices already exist.

Parameters
src- source vertex of edge
dest- destination vertex of edge
weight- edge weight
Returns
none
void bridges.base.GraphAdjMatrix< 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, HashMap<K, Integer> > bridges.base.GraphAdjMatrix< K, E >.getAdjacencyMatrix ( )

Gets the adjacency matrix

Returns
- the graph's adjacency lists
String bridges.base.GraphAdjMatrix< K, E >.getDataStructType ( )

This method gets the data structure type

Returns
The date structure type as a string
HashMap<K, Element<E> > bridges.base.GraphAdjMatrix< 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: