|
| virtual const string | getDStype () const override |
| |
| virtual | ~GraphAdjMatrix () |
| |
| | GraphAdjMatrix ()=default |
| |
| | GraphAdjMatrix (const GraphAdjMatrix &)=delete |
| |
| GraphAdjMatrix & | operator= (const GraphAdjMatrix &)=delete |
| |
| void | addVertex (const K &k, const E1 &e=E1()) |
| |
| void | addEdge (const K &src, const K &dest, const unsigned int &wt) |
| |
| const unordered_map< K, unordered_map< K, int > > & | getMatrix () const |
| |
| const unordered_map< K, int > & | getMatrix (K key) const |
| |
| unordered_map< K, Element< E1 > * > * | getVertices () |
| |
| const Element< E1 > * | getVertex (const K &key) const |
| |
| Element< E1 > * | getVertex (const K &key) |
| |
| E1 | getVertexData (const K &src) |
| |
| void | setVertexData (const K &vID, const E1 &data) |
| |
| E2 const & | getEdgeData (const K &src, const K &dest) const |
| |
| void | setEdgeData (const K &src, const K &dest, const E2 &data) |
| | Loads edge information. More...
|
| |
| ElementVisualizer * | getVisualizer (const K &k) |
| |
| LinkVisualizer * | getLinkVisualizer (const K &k1, const K &k2) |
| |
| virtual | ~DataStructure ()=default |
| |
| virtual const string | getDStype () const =0 |
| |
template<typename K, typename E1 = K, typename E2 = E1>
class bridges::datastructure::GraphAdjMatrix< K, E1, E2 >
This class provides methods to represent adjacency matrix based graphs.
The class is simply a wrapper around the C++ STL unordered_map class and thus derives all its operations from it. Given the use of operator overloading, the adjacency matrix implementation is almost identical to a normal array representation, except that any ordered type can be used to index into the matrix.
Since the adjacency matrix typically contains only a numerical value, we keep edge specific information in a separate map using a generic parameter for the type.
Generic Parameters: K that is used as an index, E1 information specific to graph vertices E2 information specific to graph edges
- Author
- Kalpathi Subramanian, Dakota Carmer
- Date
- 6/29/15, 7/10/16, 11/27/16, 4/22/18
There is a tutorial about Graph Adjacency Matrix : https://bridgesuncc.github.io/tutorials/Graph_AM.html