|
|
using | IndexType = TIndex |
| | Index type used in the depth-first search.
|
| |
|
using | StackType = std::stack<IndexType, std::vector<IndexType>> |
| | Stack type used for DFS.
|
| |
|
| | DepthFirstSearch (Eigen::Index n) |
| | Construct a new Depth First Search object.
|
| |
| void | Reserve (Eigen::Index n) |
| | Reserve memory for n vertices.
|
| |
| template<class FVisit, class TDerivedP, class TDerivedAdj> |
| void | operator() (Eigen::DenseBase< TDerivedP > const &ptr, Eigen::DenseBase< TDerivedAdj > const &adj, TIndex start, FVisit fVisit) |
| | Perform depth-first search on the graph.
|
| |
| Eigen::Index | NumVertices () const |
| | Get the number of vertices in the graph.
|
| |
|
|
Eigen::Vector< bool, Eigen::Dynamic > | visited |
| | |# vertices| x 1 visited mask
|
| |
|
StackType | stack |
| | DFS search stack.
|
| |
◆ DepthFirstSearch()
template<common::CIndex TIndex>
Construct a new Depth First Search object.
- Parameters
-
| n | Number of vertices in the graph |
◆ NumVertices()
template<common::CIndex TIndex = Index>
Get the number of vertices in the graph.
- Returns
- Number of vertices
◆ operator()()
template<common::CIndex TIndex>
template<class FVisit, class TDerivedP, class TDerivedAdj>
| void pbat::graph::DepthFirstSearch< TIndex >::operator() |
( |
Eigen::DenseBase< TDerivedP > const & | ptr, |
|
|
Eigen::DenseBase< TDerivedAdj > const & | adj, |
|
|
TIndex | start, |
|
|
FVisit | fVisit ) |
|
inline |
Perform depth-first search on the graph.
- Template Parameters
-
| FVisit | Callable type with signature void(IndexType) |
| TDerivedP | Type of the pointer vector (adjacency list start indices for each vertex) |
| TDerivedAdj | Type of the adjacency list (vector of vertex indices) |
- Parameters
-
| ptr | Pointer to the start of each vertex's adjacency list |
| adj | Adjacency list of the graph |
| start | Starting vertex index |
| fVisit | Function to call for each visited vertex |
◆ Reserve()
template<common::CIndex TIndex>
Reserve memory for n vertices.
- Parameters
-
| n | Number of vertices in the graph |
The documentation for this struct was generated from the following file: