|
EnTT 3.13.2
|
Basic implementation of a directed adjacency matrix. More...
#include <adjacency_matrix.hpp>
Public Types | |
| using | allocator_type = Allocator |
| Allocator type. | |
| using | size_type = std::size_t |
| Unsigned integer type. | |
| using | vertex_type = size_type |
| Vertex type. | |
| using | edge_type = std::pair<vertex_type, vertex_type> |
| Edge type. | |
| using | vertex_iterator = iota_iterator<vertex_type> |
| Vertex iterator type. | |
| using | edge_iterator = internal::edge_iterator<typename container_type::const_iterator> |
| Edge iterator type. | |
| using | out_edge_iterator = edge_iterator |
| Out edge iterator type. | |
| using | in_edge_iterator = edge_iterator |
| In edge iterator type. | |
| using | graph_category = Category |
| Graph category tag. | |
Public Member Functions | |
| adjacency_matrix () noexcept(noexcept(allocator_type{})) | |
| Default constructor. | |
| adjacency_matrix (const allocator_type &allocator) noexcept | |
| Constructs an empty container with a given allocator. | |
| adjacency_matrix (const size_type vertices, const allocator_type &allocator=allocator_type{}) | |
| Constructs an empty container with a given allocator and user supplied number of vertices. | |
| adjacency_matrix (const adjacency_matrix &other) | |
| Copy constructor. | |
| adjacency_matrix (const adjacency_matrix &other, const allocator_type &allocator) | |
| Allocator-extended copy constructor. | |
| adjacency_matrix (adjacency_matrix &&other) noexcept | |
| Move constructor. | |
| adjacency_matrix (adjacency_matrix &&other, const allocator_type &allocator) | |
| Allocator-extended move constructor. | |
| adjacency_matrix & | operator= (const adjacency_matrix &other) |
| Default copy assignment operator. | |
| adjacency_matrix & | operator= (adjacency_matrix &&other) noexcept |
| Default move assignment operator. | |
| constexpr allocator_type | get_allocator () const noexcept |
| Returns the associated allocator. | |
| void | clear () noexcept |
| Clears the adjacency matrix. | |
| void | swap (adjacency_matrix &other) |
| Exchanges the contents with those of a given adjacency matrix. | |
| size_type | size () const noexcept |
| Returns the number of vertices. | |
| iterable_adaptor< vertex_iterator > | vertices () const noexcept |
| Returns an iterable object to visit all vertices of a matrix. | |
| iterable_adaptor< edge_iterator > | edges () const noexcept |
| Returns an iterable object to visit all edges of a matrix. | |
| iterable_adaptor< out_edge_iterator > | out_edges (const vertex_type vertex) const noexcept |
| Returns an iterable object to visit all out edges of a vertex. | |
| iterable_adaptor< in_edge_iterator > | in_edges (const vertex_type vertex) const noexcept |
| Returns an iterable object to visit all in edges of a vertex. | |
| void | resize (const size_type vertices) |
| Resizes an adjacency matrix. | |
| std::pair< edge_iterator, bool > | insert (const vertex_type lhs, const vertex_type rhs) |
| Inserts an edge into the adjacency matrix, if it does not exist. | |
| size_type | erase (const vertex_type lhs, const vertex_type rhs) |
| Removes the edge associated with a pair of given vertices. | |
| bool | contains (const vertex_type lhs, const vertex_type rhs) const |
| Checks if an adjacency matrix contains a given edge. | |
Basic implementation of a directed adjacency matrix.
| Category | Either a directed or undirected category tag. |
| Allocator | Type of allocator used to manage memory and elements. |
Definition at line 95 of file adjacency_matrix.hpp.
| using entt::adjacency_matrix< Category, Allocator >::allocator_type = Allocator |
Allocator type.
Definition at line 103 of file adjacency_matrix.hpp.
| using entt::adjacency_matrix< Category, Allocator >::edge_iterator = internal::edge_iterator<typename container_type::const_iterator> |
Edge iterator type.
Definition at line 113 of file adjacency_matrix.hpp.
| using entt::adjacency_matrix< Category, Allocator >::edge_type = std::pair<vertex_type, vertex_type> |
Edge type.
Definition at line 109 of file adjacency_matrix.hpp.
| using entt::adjacency_matrix< Category, Allocator >::graph_category = Category |
Graph category tag.
Definition at line 119 of file adjacency_matrix.hpp.
| using entt::adjacency_matrix< Category, Allocator >::in_edge_iterator = edge_iterator |
In edge iterator type.
Definition at line 117 of file adjacency_matrix.hpp.
| using entt::adjacency_matrix< Category, Allocator >::out_edge_iterator = edge_iterator |
Out edge iterator type.
Definition at line 115 of file adjacency_matrix.hpp.
| using entt::adjacency_matrix< Category, Allocator >::size_type = std::size_t |
Unsigned integer type.
Definition at line 105 of file adjacency_matrix.hpp.
| using entt::adjacency_matrix< Category, Allocator >::vertex_iterator = iota_iterator<vertex_type> |
Vertex iterator type.
Definition at line 111 of file adjacency_matrix.hpp.
| using entt::adjacency_matrix< Category, Allocator >::vertex_type = size_type |
Vertex type.
Definition at line 107 of file adjacency_matrix.hpp.
|
inlinenoexcept |
Default constructor.
Definition at line 122 of file adjacency_matrix.hpp.
|
inlineexplicitnoexcept |
Constructs an empty container with a given allocator.
| allocator | The allocator to use. |
Definition at line 129 of file adjacency_matrix.hpp.
|
inline |
Constructs an empty container with a given allocator and user supplied number of vertices.
| vertices | Number of vertices. |
| allocator | The allocator to use. |
Definition at line 138 of file adjacency_matrix.hpp.
|
inline |
Copy constructor.
| other | The instance to copy from. |
Definition at line 146 of file adjacency_matrix.hpp.
|
inline |
Allocator-extended copy constructor.
| other | The instance to copy from. |
| allocator | The allocator to use. |
Definition at line 154 of file adjacency_matrix.hpp.
|
inlinenoexcept |
Move constructor.
| other | The instance to move from. |
Definition at line 162 of file adjacency_matrix.hpp.
|
inline |
Allocator-extended move constructor.
| other | The instance to move from. |
| allocator | The allocator to use. |
Definition at line 170 of file adjacency_matrix.hpp.
|
inlinenoexcept |
Clears the adjacency matrix.
Definition at line 205 of file adjacency_matrix.hpp.
|
inline |
Checks if an adjacency matrix contains a given edge.
| lhs | The left hand vertex of the edge. |
| rhs | The right hand vertex of the edge. |
Definition at line 329 of file adjacency_matrix.hpp.
|
inlinenoexcept |
Returns an iterable object to visit all edges of a matrix.
Definition at line 240 of file adjacency_matrix.hpp.
|
inline |
Removes the edge associated with a pair of given vertices.
| lhs | The left hand vertex of the edge. |
| rhs | The right hand vertex of the edge. |
Definition at line 311 of file adjacency_matrix.hpp.
|
inlineconstexprnoexcept |
Returns the associated allocator.
Definition at line 200 of file adjacency_matrix.hpp.
|
inlinenoexcept |
Returns an iterable object to visit all in edges of a vertex.
| vertex | The vertex of which to return all in edges. |
Definition at line 263 of file adjacency_matrix.hpp.
|
inline |
Inserts an edge into the adjacency matrix, if it does not exist.
| lhs | The left hand vertex of the edge. |
| rhs | The right hand vertex of the edge. |
Definition at line 292 of file adjacency_matrix.hpp.
|
inlinenoexcept |
Default move assignment operator.
| other | The instance to move from. |
Definition at line 190 of file adjacency_matrix.hpp.
|
inline |
Default copy assignment operator.
| other | The instance to copy from. |
Definition at line 179 of file adjacency_matrix.hpp.
|
inlinenoexcept |
Returns an iterable object to visit all out edges of a vertex.
| vertex | The vertex of which to return all out edges. |
Definition at line 251 of file adjacency_matrix.hpp.
|
inline |
Resizes an adjacency matrix.
| vertices | The new number of vertices. |
Definition at line 274 of file adjacency_matrix.hpp.
|
inlinenoexcept |
Returns the number of vertices.
Definition at line 224 of file adjacency_matrix.hpp.
|
inline |
Exchanges the contents with those of a given adjacency matrix.
| other | Adjacency matrix to exchange the content with. |
Definition at line 214 of file adjacency_matrix.hpp.
|
inlinenoexcept |
Returns an iterable object to visit all vertices of a matrix.
Definition at line 232 of file adjacency_matrix.hpp.