Adjacency list.
More...
#include <lagrange/utils/AdjacencyList.h>
|
using | ValueArray = std::vector< Index > |
|
using | IndexArray = std::vector< size_t > |
|
template<typename Index>
class lagrange::AdjacencyList< Index >
Adjacency list.
- Template Parameters
-
◆ AdjacencyList()
Initialize adjacency list data.
- Parameters
-
data | The flattened adjacency list for all entries. |
indices | The starting index of adjacency list for each entry. This list should have size num_entries + 1 , where entry i is adjacent to entries from m_data[i] (included) to m_data[i+1] (not included). |
◆ get_num_entries()
size_t get_num_entries |
( |
| ) |
const |
|
inline |
Get total number of entries.
- Returns
- The total number of entries.
◆ get_neighbors()
span< const Index > get_neighbors |
( |
size_t |
i | ) |
const |
|
inline |
Get adjacency list of entry i.
- Parameters
-
[in] | i | The query entry index. |
- Returns
- A list of adjacency entries.
◆ get_num_neighbors()
size_t get_num_neighbors |
( |
size_t |
i | ) |
const |
|
inline |
Get the number of neighbors of a given entry.
- Parameters
-
- Returns
- The number of neighbors to i'th entry.
The documentation for this class was generated from the following file: