|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Performs a breadth-first search for a path between a pair of nodes. More...
#include <tpl_find_path.H>
Public Member Functions | |
| Find_Path_Breadth_First (SA &_sa) | |
| Find_Path_Breadth_First (SA &&_sa=SA()) | |
| template<class Op > | |
| Path< GT > | operator() (const GT &g, typename GT::Node *start, Op &op) |
| Invokes the breadth-first path search. | |
| template<class Op > | |
| Path< GT > | operator() (const GT &g, typename GT::Node *start, Op &&op) |
| bool | operator() (const GT &g, typename GT::Node *start, typename GT::Node *end, Path< GT > &path) |
| Invokes the breadth-first path search. | |
| Path< GT > | operator() (const GT &g, typename GT::Node *start, typename GT::Node *end) |
| Invokes the breadth-first path search. | |
Private Member Functions | |
| template<class Op > | |
| bool | find_path (const GT &g, typename GT::Node *start, Path< GT > &path, Op &op) |
| template<class Op > | |
| bool | find_path (const GT &g, typename GT::Node *start, Path< GT > &path, Op &&op) |
Private Attributes | |
| SA & | sa |
Performs a breadth-first search for a path between a pair of nodes.
Find_Path_Breadth_First searches breadth-first for a path between start_node and end_node, building a path toward the destination node as it goes. If a path is found, the method returns true and the path parameter holds the path in question; otherwise, the function returns false and the path's value is indeterminate.
The class takes two type parameters:
Definition at line 275 of file tpl_find_path.H.
|
inline |
Definition at line 359 of file tpl_find_path.H.
|
inline |
Definition at line 364 of file tpl_find_path.H.
|
inlineprivate |
Definition at line 352 of file tpl_find_path.H.
References Aleph::Find_Path_Breadth_First< GT, Itor, SA >::find_path().
|
inlineprivate |
Definition at line 280 of file tpl_find_path.H.
References ah_invalid_argument_if, Aleph::and, ARC_BITS, Aleph::blossom_maximum_cardinality_matching(), Aleph::Path< GT >::empty(), Aleph::DynListQueue< T >::empty(), Aleph::Find_Path, Aleph::DynListQueue< T >::get(), GraphCommon< GT, Node, Arc >::get_src_node(), GraphCommon< GT, Node, Arc >::get_tgt_node(), Aleph::Path< GT >::insert(), Aleph::Path< GT >::inside_graph(), IS_ARC_VISITED, Aleph::DynListQueue< T >::is_empty(), IS_NODE_VISITED, NODE_BITS, NODE_COOKIE, Aleph::DynListQueue< T >::put(), GraphCommon< GT, Node, Arc >::reset_arcs(), GraphCommon< GT, Node, Arc >::reset_nodes(), and Aleph::Find_Path_Breadth_First< GT, Itor, SA >::sa.
Referenced by Aleph::Find_Path_Breadth_First< GT, Itor, SA >::find_path(), Aleph::Find_Path_Breadth_First< GT, Itor, SA >::operator()(), Aleph::Find_Path_Breadth_First< GT, Itor, SA >::operator()(), Aleph::Find_Path_Breadth_First< GT, Itor, SA >::operator()(), and Aleph::Find_Path_Breadth_First< GT, Itor, SA >::operator()().
|
inline |
Definition at line 387 of file tpl_find_path.H.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::Find_Path_Breadth_First< GT, Itor, SA >::find_path().
|
inline |
Invokes the breadth-first path search.
| [in] | g | the graph on which the path is to be searched. |
| [in] | start | pointer to the path's starting node. |
| [in] | op | the end-of-search criterion on the visited node |
| bad_alloc | if there is not enough memory to keep building the path or for the breadth-first traversal's internal queue. |
Definition at line 379 of file tpl_find_path.H.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::Find_Path_Breadth_First< GT, Itor, SA >::find_path().
|
inline |
Invokes the breadth-first path search.
| [in] | g | the graph on which the path is to be searched. |
| [in] | start | pointer to the path's starting node. |
| [in] | end | pointer to the path's destination node. |
| bad_alloc | if there is not enough memory to keep building the path or for the breadth-first traversal's internal queue. |
Definition at line 419 of file tpl_find_path.H.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::Find_Path_Breadth_First< GT, Itor, SA >::find_path().
|
inline |
Invokes the breadth-first path search.
| [in] | g | the graph on which the path is to be searched. |
| [in] | start | pointer to the path's starting node. |
| [in] | end | pointer to the path's destination node. |
| [out] | path | the path seen during the breadth-first search; only meaningful if the return value is true. |
| bad_alloc | if there is not enough memory to keep building the path or for the breadth-first traversal's internal queue. |
Definition at line 404 of file tpl_find_path.H.
References Aleph::Find_Path_Breadth_First< GT, Itor, SA >::find_path().
|
private |
Definition at line 277 of file tpl_find_path.H.
Referenced by Aleph::Find_Path_Breadth_First< GT, Itor, SA >::find_path().