PGROUTING
3.2
|
#include "pgr_depthFirstSearch.hpp"
Public Types | |
typedef G::E | E |
typedef G::V | V |
DepthFirstSearch | |
std::vector< pgr_mst_rt > | depthFirstSearch (G &graph, std::vector< int64_t > roots, bool directed, int64_t max_depth) |
depthFirstSearch function More... | |
bool | depthFirstSearch_single_vertex (G &graph, V root, std::vector< E > &visited_order, bool directed, int64_t max_depth) |
Calls the Boost function. More... | |
template<typename T > | |
std::vector< pgr_mst_rt > | get_results (T visited_order, int64_t root, int64_t max_depth, const G &graph) |
to get the results More... | |
Definition at line 54 of file pgr_depthFirstSearch.hpp.
typedef G::E pgrouting::functions::Pgr_depthFirstSearch< G >::E |
Definition at line 57 of file pgr_depthFirstSearch.hpp.
typedef G::V pgrouting::functions::Pgr_depthFirstSearch< G >::V |
Definition at line 56 of file pgr_depthFirstSearch.hpp.
|
inline |
depthFirstSearch function
It does all the processing and returns the results.
graph | the graph containing the edges |
roots | the root vertices |
max_depth | the maximum depth of traversal |
directed | whether the graph is directed or undirected |
Definition at line 80 of file pgr_depthFirstSearch.hpp.
References pgrouting::functions::Pgr_depthFirstSearch< G >::depthFirstSearch_single_vertex(), and pgrouting::functions::Pgr_depthFirstSearch< G >::get_results().
Referenced by pgr_depthFirstSearch().
|
inlineprivate |
Calls the Boost function.
Calls boost::depth_first_search and boost::undirected_dfs for directed graphs and undirected graphs, respectively.
graph | the graph containing the edges |
root | the root vertex |
visited_order | vector which will contain the edges of the resulting traversal |
directed | whether the graph is directed or undirected |
Definition at line 122 of file pgr_depthFirstSearch.hpp.
Referenced by pgrouting::functions::Pgr_depthFirstSearch< G >::depthFirstSearch().
|
inlineprivate |
to get the results
Uses the visited_order
of vertices to get the results. Selects only those nodes in the final result whose depth is less than the max_depth
.
visited_order | vector which contains the edges of the resulting traversal |
root | the root vertex |
max_depth | the maximum depth of traversal |
graph | the graph containing the edges |
results
vector Definition at line 179 of file pgr_depthFirstSearch.hpp.
Referenced by pgrouting::functions::Pgr_depthFirstSearch< G >::depthFirstSearch().