This class provides a static adjacency list data structure. It is commonly used to store directed graphs. For each node in the contiguous list of nodes [0, 1, 2, ..., n) it stores the connected nodes. The representation is strictly local, i.e. it is not parallel aware.
More...
#include <AdjacencyList.h>
|
| AdjacencyList (const std::int32_t n) |
| Construct trivial adjacency list where each of the n nodes is connected to itself. More...
|
|
template<typename U , typename V , std::enable_if_t< std::is_base_of< Eigen::EigenBase< std::decay_t< V >>, std::decay_t< V >>::value, int > = 0> |
| AdjacencyList (U &&data, V &&offsets) |
| Construct adjacency list from arrays of data (Eigen data types) More...
|
|
template<typename U , typename V , std::enable_if_t<!std::is_base_of< Eigen::EigenBase< std::decay_t< V >>, std::decay_t< V >>::value, int > = 0> |
| AdjacencyList (U &&data, V &&offsets) |
| Construct adjacency list from arrays of data (non-Eigen data types) More...
|
|
| AdjacencyList (const Eigen::Ref< const Eigen::Array< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >> &matrix) |
| Construct adjacency list for a problem with a fixed number of links (edges) for each node. More...
|
|
template<typename X > |
| AdjacencyList (const std::vector< X > &data) |
| Set all connections for all entities (T is a '2D' container, e.g. a std::vector<<std::vector<std::size_t>>, std::vector<<std::set<std::size_t>>, etc) More...
|
|
| AdjacencyList (const AdjacencyList &list)=default |
| Copy constructor.
|
|
| AdjacencyList (AdjacencyList &&list)=default |
| Move constructor.
|
|
| ~AdjacencyList ()=default |
| Destructor.
|
|
AdjacencyList & | operator= (const AdjacencyList &list)=default |
| Assignment.
|
|
AdjacencyList & | operator= (AdjacencyList &&list)=default |
| Move assignment.
|
|
bool | operator== (const AdjacencyList &list) const |
| Equality operator.
|
|
std::int32_t | num_nodes () const |
| Number of nodes. More...
|
|
int | num_links (int node) const |
| Number of connections for given node. More...
|
|
Eigen::Array< T, Eigen::Dynamic, 1 >::SegmentReturnType | links (int node) |
| Links (edges) for given node. More...
|
|
Eigen::Array< T, Eigen::Dynamic, 1 >::ConstSegmentReturnType | links (int node) const |
| Links (edges) for given node (const version) More...
|
|
const std::int32_t * | links_ptr (int node) const |
| TODO: attempt to remove.
|
|
const Eigen::Array< T, Eigen::Dynamic, 1 > & | array () const |
| Return contiguous array of links for all nodes (const version)
|
|
const Eigen::Array< std::int32_t, Eigen::Dynamic, 1 > & | offsets () const |
| Offset for each node in array() (const version)
|
|
std::size_t | hash () const |
| Hash of graph.
|
|
std::string | str () const |
| Return informal string representation (pretty-print)
|
|
template<typename T>
class dolfinx::graph::AdjacencyList< T >
This class provides a static adjacency list data structure. It is commonly used to store directed graphs. For each node in the contiguous list of nodes [0, 1, 2, ..., n) it stores the connected nodes. The representation is strictly local, i.e. it is not parallel aware.
◆ AdjacencyList() [1/5]
Construct trivial adjacency list where each of the n nodes is connected to itself.
- Parameters
-
◆ AdjacencyList() [2/5]
template<typename T >
template<typename U , typename V , std::enable_if_t< std::is_base_of< Eigen::EigenBase< std::decay_t< V >>, std::decay_t< V >>::value, int > = 0>
Construct adjacency list from arrays of data (Eigen data types)
- Parameters
-
[in] | data | Adjacency array |
[in] | offsets | The index to the adjacency list in the data array for node i |
◆ AdjacencyList() [3/5]
template<typename T >
template<typename U , typename V , std::enable_if_t<!std::is_base_of< Eigen::EigenBase< std::decay_t< V >>, std::decay_t< V >>::value, int > = 0>
Construct adjacency list from arrays of data (non-Eigen data types)
- Parameters
-
[in] | data | Adjacency array |
[in] | offsets | The index to the adjacency list in the data array for node i |
◆ AdjacencyList() [4/5]
Construct adjacency list for a problem with a fixed number of links (edges) for each node.
- Parameters
-
[in] | matrix | Two-dimensional array of adjacency data where matrix(i, j) is the jth neighbor of the ith node |
◆ AdjacencyList() [5/5]
template<typename T >
template<typename X >
Set all connections for all entities (T is a '2D' container, e.g. a std::vector<<std::vector<std::size_t>>, std::vector<<std::set<std::size_t>>, etc)
- Parameters
-
◆ links() [1/2]
Links (edges) for given node.
- Parameters
-
- Returns
- Array of outgoing links for the node. The length will be AdjacencyList:num_links(node).
◆ links() [2/2]
Links (edges) for given node (const version)
- Parameters
-
- Returns
- Array of outgoing links for the node. The length will be AdjacencyList:num_links(node).
◆ num_links()
Number of connections for given node.
- Parameters
-
- Returns
- The number of outgoing links (edges) from the node
◆ num_nodes()
Number of nodes.
- Returns
- The number of nodes
The documentation for this class was generated from the following files:
- /build/dolfinx-kFTZhX/dolfinx-2019.2.0~git20200420.6043d6d/cpp/dolfinx/fem/assemble_matrix_impl.h
- /build/dolfinx-kFTZhX/dolfinx-2019.2.0~git20200420.6043d6d/cpp/dolfinx/graph/AdjacencyList.h