|
| template<typename TGraph , typename TNode , typename F = std::function<bool(const TNode &, const size_t &)>> |
| static void | run (const TGraph &graph, const TNode &start, unsigned long max_depth=std::numeric_limits< unsigned long >::max(), F f_user=[](const TNode &, const size_t &) -> bool { return false;}) |
| |
| template<typename TGraph , typename TNode , typename F = std::function<void(const TNode &, const size_t &)>> |
| static ext::vector< TNode > | findPath (const TGraph &graph, const TNode &start, const TNode &goal, unsigned long max_depth=std::numeric_limits< unsigned long >::max(), F f_user=[](const TNode &, const size_t &) {}) |
| |
| template<typename TGraph , typename TNode > |
| static ext::vector< TNode > | findPathRegistration (const TGraph &graph, const TNode &start, const TNode &goal) |
| |
| template<typename TGraph , typename TNode , typename F = std::function<void(const TNode &, const size_t &)>> |
| static ext::vector< TNode > | findPathBidirectional (const TGraph &graph, const TNode &start, const TNode &goal, unsigned long max_depth=std::numeric_limits< unsigned long >::max(), F f_user=[](const TNode &, const size_t &) {}) |
| |
| template<typename TGraph , typename TNode > |
| static ext::vector< TNode > | findPathBidirectionalRegistration (const TGraph &graph, const TNode &start, const TNode &goal) |
| |
template<typename TGraph , typename TNode , typename F >
| ext::vector< TNode > graph::traverse::IDDFS::findPath |
( |
const TGraph & |
graph, |
|
|
const TNode & |
start, |
|
|
const TNode & |
goal, |
|
|
unsigned long |
max_depth = std::numeric_limits<unsigned long>::max(), |
|
|
F |
f_user = [](const TNode &, const size_t &) {} |
|
) |
| |
|
static |
Find the shortest path using IDDFS algorithm from the start node to the goal node in the graph. Be aware that running this algorithm on a non-tree graph gonna be extremely slow.
Whenever node is opened, f_user is called with two parameters (the opened node and distance to this node).
- Parameters
-
| graph | to explore. |
| start | initial node. |
| goal | final node. |
| max_depth | set maximal allowed depth for IDDFS. |
| f_user | function which is called for every opened node with value of currently shortest path. |
- Returns
- nodes in shortest path, if there is no such path vector is empty.
template<typename TGraph , typename TNode , typename F >
| ext::vector< TNode > graph::traverse::IDDFS::findPathBidirectional |
( |
const TGraph & |
graph, |
|
|
const TNode & |
start, |
|
|
const TNode & |
goal, |
|
|
unsigned long |
max_depth = std::numeric_limits<unsigned long>::max(), |
|
|
F |
f_user = [](const TNode &, const size_t &) {} |
|
) |
| |
|
static |
Find the shortest path using IDDFS algorithm from the start node to the goal node in the graph. This algorithm is run in both direction, from start and also from goal. Be aware that running this algorithm on a non-tree graph gonna be extremely slow.
Whenever node is opened, f_user is called with two parameters (the opened node and distance to this node).
- Parameters
-
| graph | to explore. |
| start | initial node. |
| goal | final node. |
| max_depth | set maximal allowed depth for IDDFS. |
| f_user | function which is called for every opened node with value of currently shortest path. |
- Returns
- nodes in shortest path, if there is no such path vector is empty.
template<typename TGraph , typename TNode , typename F >
| void graph::traverse::IDDFS::run |
( |
const TGraph & |
graph, |
|
|
const TNode & |
start, |
|
|
unsigned long |
max_depth = std::numeric_limits<unsigned long>::max(), |
|
|
F |
f_user = [](const TNode &, const size_t &) -> bool { return false; } |
|
) |
| |
|
static |
Run IDDFS algorithm from the start node in the graph. Be aware that running this algorithm on a non-tree graph gonna be extremely slow.
Whenever node is opened, f_user is called with two parameters (the opened node and distance to this node). If return of f_user is true, then the algorithm is stopped.
- Parameters
-
| graph | to explore. |
| start | initial node. |
| max_depth | set maximal allowed depth for IDDFS. |
| f_user | function which is called for every opened node with value of currently shortest path. |