|
Template Numerical Library version\ main:4e6e2c1
|
Graph class represents a mathematical graph using an adjacency matrix. More...
#include <TNL/Graphs/GraphBase.h>
Public Types | |
| using | AdjacencyMatrixView = AdjacencyMatrixView_ |
| Type of the adjacency matrix view. | |
| using | ConstAdjacencyMatrixView = typename AdjacencyMatrixView::ConstViewType |
| Type of constant view of the adjacency matrix. | |
| using | ConstVertexView = typename VertexView::ConstVertexView |
| using | DeviceType = Device |
| Type of device where the graph will be operating. | |
| using | GraphOrientation = Orientation |
| Type of the graph - directed or undirected. | |
| using | IndexType = Index |
| Type for indexing of the graph nodes. | |
| using | ValueType = Value |
| Type for weights of the graph edges. | |
| using | VertexView = GraphVertexView< AdjacencyMatrixView, Orientation > |
Public Member Functions | |
| GraphBase ()=default | |
| Default constructor. | |
| GraphBase (const GraphBase &)=default | |
| Copy constructor. | |
| GraphBase (GraphBase &&)=default | |
| Move constructor. | |
| ~GraphBase ()=default | |
| Destructor. | |
| __cuda_callable__ AdjacencyMatrixView & | getAdjacencyMatrixView () |
| Returns the view of adjacency matrix of the graph. | |
| __cuda_callable__ const AdjacencyMatrixView & | getAdjacencyMatrixView () const |
| Returns the constant view of adjacency matrix of the graph. | |
| __cuda_callable__ IndexType | getEdgeCount () const |
| Returns the number of edges in the graph. | |
| __cuda_callable__ ValueType | getEdgeWeight (IndexType vertexIdx, IndexType edgeIdx) const |
| __cuda_callable__ VertexView | getVertex (IndexType vertexIdx) |
| __cuda_callable__ ConstVertexView | getVertex (IndexType vertexIdx) const |
| __cuda_callable__ IndexType | getVertexCount () const |
| Returns the number of nodes in the graph. | |
| __cuda_callable__ IndexType | getVertexDegree (IndexType nodeIdx) const |
| GraphBase & | operator= (const GraphBase &)=delete |
| Copy-assignment operator. | |
| GraphBase & | operator= (GraphBase &&)=delete |
| Move-assignment operator. | |
| bool | operator== (const GraphBase &other) const |
| Comparisons operator. | |
| __cuda_callable__ void | setEdgeWeight (IndexType vertexIdx, IndexType edgeIdx, const ValueType &value) |
Static Public Member Functions | |
| static std::string | getSerializationType () |
| Returns the type of serialization used for the graph. | |
| static constexpr bool | isDirected () |
| Checks if the graph is directed. | |
| static constexpr bool | isUndirected () |
| Checks if the graph is undirected. | |
Protected Attributes | |
| AdjacencyMatrixView | adjacencyMatrixView |
Graph class represents a mathematical graph using an adjacency matrix.
| Matrix | is type of matrix used to store the adjacency matrix of the graph. |
| GraphType | is type of the graph - directed or undirected. |
|
delete |
Copy-assignment operator.
Copy-assignment operator is deleted since it requires data allocation.
|
delete |
Move-assignment operator.
Move-assignment operator is deleted since it requires data allocation.