|
|
using | IndexType = TIndex |
| | Index type used in the breadth-first search.
|
| |
|
using | QueueType = std::queue<IndexType> |
| | Queue type used for BFS.
|
| |
|
| | BreadthFirstSearch (Eigen::Index n) |
| | Construct a new Breadth 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
|
| |
|
QueueType | queue |
| | BFS search queue.
|
| |
◆ BreadthFirstSearch()
template<common::CIndex TIndex>
Construct a new Breadth 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::BreadthFirstSearch< 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: