![]() |
Bridges-Java-2.2
2.2.0
Bridges(JavaAPI)
|
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 = "\"" |
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
| bridges.base.GraphAdjMatrix< K, E >.GraphAdjMatrix | ( | int | size | ) |
Constructor
| void bridges.base.GraphAdjMatrix< 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 vertices already exist.
| src | - source vertex of edge |
| dest | - destination vertex of edge |
| weight | - edge weight |
| void bridges.base.GraphAdjMatrix< 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, HashMap<K, Integer> > bridges.base.GraphAdjMatrix< K, E >.getAdjacencyMatrix | ( | ) |
Gets the adjacency matrix
| String bridges.base.GraphAdjMatrix< K, E >.getDataStructType | ( | ) |
This method gets the data structure type
| HashMap<K, Element<E> > bridges.base.GraphAdjMatrix< K, E >.getVertices | ( | ) |
This method returns the graph nodes
1.8.10