![]() |
Bridges-Java-2.2
2.2.0
Bridges(JavaAPI)
|
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 = "\"" |
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, 6/29/15
| Element<E> |
| bridges.base.GraphAdjList< K, E >.GraphAdjList | ( | ) |
Constructor
| void bridges.base.GraphAdjList< K, E >.addEdge | ( | K | src, |
| K | 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.
| src | - source vertex of edge |
| dest | - destination vertex of edge |
| weight | - edge weight |
| void bridges.base.GraphAdjList< K, E >.addVertex | ( | K | k, |
| E | 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
| K | - vertex key value |
| HashMap<K, SLelement<Edge<K> > > bridges.base.GraphAdjList< K, E >.getAdjacencyList | ( | ) |
Gets the adjacency list (of type SLelement<Edge> )
| SLelement<Edge<K> > bridges.base.GraphAdjList< K, E >.getAdjacencyList | ( | K | vertex | ) |
Gets the adjacency list (of type SLelement<Edge> of a vertex)
| - | vertex key |
| String bridges.base.GraphAdjList< K, E >.getDataStructType | ( | ) |
This method gets the data structure type
| HashMap<K, Element<E> > bridges.base.GraphAdjList< K, E >.getVertices | ( | ) |
This method returns the graph nodes
1.8.10