|
ADS
Algorithms and Data Structures
|
The GRAPH with an adjacency matrix of section 9.3 [see Graph.h]: the weight of \( ( u , v ) \), or nothing, the infinity of the book, in place \( ( u , v ) \); \( \Theta( n^2 ) \) space, hasEdge() in \( O( 1 ) \), adj( u ) in \( \Theta( n ) \), insertNode() and deleteNode() in \( \Theta( n ) \). More...
#include "ADS/Contract.h"#include "ADS/Iterators.h"#include "ADS/graph/Graph.h"#include <cstddef>#include <optional>#include <ranges>#include <variant>#include <vector>#include "ADS/graph/impl/MatrixGraph.tpp"Go to the source code of this file.
Classes | |
| class | ADS::MatrixGraph< W, T > |
| a graph with an adjacency matrix More... | |
| struct | ADS::MatrixGraph< W, T >::Present |
| the columns of the edges in a row, for SlotIterator More... | |
Namespaces | |
| namespace | ADS |
The GRAPH with an adjacency matrix of section 9.3 [see Graph.h]: the weight of \( ( u , v ) \), or nothing, the infinity of the book, in place \( ( u , v ) \); \( \Theta( n^2 ) \) space, hasEdge() in \( O( 1 ) \), adj( u ) in \( \Theta( n ) \), insertNode() and deleteNode() in \( \Theta( n ) \).
The contracts [see Contract.h]: insertEdge() and deleteEdge() need two distinct nodes, deleteNode(), adj(), forEachAdj() and forEachEdge() a node; the invariant is that the matrix is n x n with no entry on the diagonal nor in the rows and columns of the names not in use, m() entries in all, and symmetric for an unoriented graph. The operations check it on the rows and the columns they touch, in \( O( n ) \). The operations are defined in MatrixGraph.tpp.