|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Performs a depth-first search for a path between a pair of nodes. More...
#include <tpl_find_path.H>
Public Member Functions | |
| Find_Path_Depth_First (SA &&__sa=SA()) | |
| Find_Path_Depth_First (SA &__sa) | |
| bool | operator() (const GT &g, typename GT::Node *start, typename GT::Node *end, Path< GT > &path) |
| Invokes the depth-first path search. | |
| Path< GT > | operator() (const GT &g, typename GT::Node *start, typename GT::Node *end) |
| Invokes the depth-first path search. | |
| template<class Op > | |
| Path< GT > | operator() (const GT &g, typename GT::Node *start, Op &op) |
| Invokes the depth-first path search. | |
| template<class Op = Dft_Goal_Node<GT>> | |
| Path< GT > | operator() (const GT &g, typename GT::Node *start, Op &&op) |
Private Member Functions | |
| template<class Op > | |
| bool | find_path (typename GT::Node *curr, typename GT::Arc *arc, Path< GT > &path, Op &op) |
| template<class Op > | |
| bool | find (const GT &g, typename GT::Node *start, Path< GT > &path, Op &op) |
| template<class Op > | |
| bool | find (const GT &g, typename GT::Node *start, Path< GT > &path, Op &&op) |
Private Attributes | |
| SA & | sa |
| GT * | g_ptr = nullptr |
Performs a depth-first search for a path between a pair of nodes.
Find_Path_Depth_First searches depth-first for a path between start_node and end_node, building a path equivalent to the recursive depth of the search 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 96 of file tpl_find_path.H.
|
inline |
Definition at line 175 of file tpl_find_path.H.
|
inline |
Definition at line 180 of file tpl_find_path.H.
|
inlineprivate |
Definition at line 169 of file tpl_find_path.H.
References Aleph::Find_Path_Depth_First< GT, Itor, SA >::find().
|
inlineprivate |
Definition at line 136 of file tpl_find_path.H.
References ARC_BITS, Aleph::blossom_maximum_cardinality_matching(), Aleph::Find_Path, Aleph::Find_Path_Depth_First< GT, Itor, SA >::find_path(), Aleph::Find_Path_Depth_First< GT, Itor, SA >::g_ptr, GraphCommon< GT, Node, Arc >::get_connected_node(), IS_NODE_VISITED, NODE_BITS, Aleph::Path< GT >::remove_last_node(), GraphCommon< GT, Node, Arc >::reset_bit_arcs(), GraphCommon< GT, Node, Arc >::reset_bit_nodes(), Aleph::Find_Path_Depth_First< GT, Itor, SA >::sa, and Aleph::Path< GT >::set_graph().
Referenced by Aleph::Find_Path_Depth_First< GT, Itor, SA >::find(), Aleph::Find_Path_Depth_First< GT, Itor, SA >::operator()(), and Aleph::Find_Path_Depth_First< GT, Itor, SA >::operator()().
|
inlineprivate |
Definition at line 102 of file tpl_find_path.H.
References Aleph::Path< GT >::append(), ARC_BITS, Aleph::blossom_maximum_cardinality_matching(), Aleph::Find_Path, Aleph::Find_Path_Depth_First< GT, Itor, SA >::find_path(), Aleph::Find_Path_Depth_First< GT, Itor, SA >::g_ptr, GraphCommon< GT, Node, Arc >::get_connected_node(), IS_ARC_VISITED, IS_NODE_VISITED, NODE_BITS, Aleph::Path< GT >::remove_last_node(), and Aleph::Find_Path_Depth_First< GT, Itor, SA >::sa.
Referenced by Aleph::Find_Path_Depth_First< GT, Itor, SA >::find(), and Aleph::Find_Path_Depth_First< GT, Itor, SA >::find_path().
|
inline |
Definition at line 241 of file tpl_find_path.H.
References Aleph::blossom_maximum_cardinality_matching().
|
inline |
Invokes the depth-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 | functor that implements the search criterion. The functor receives the node as a parameter and must return true if the node satisfies the criterion, false otherwise. |
| bad_alloc | if there is not enough memory to keep building the path |
Definition at line 233 of file tpl_find_path.H.
References Aleph::blossom_maximum_cardinality_matching().
|
inline |
Invokes the depth-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. |
end if this one was found; false otherwise | bad_alloc | if there is not enough memory to keep building the path |
Definition at line 211 of file tpl_find_path.H.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::Find_Path_Depth_First< GT, Itor, SA >::find().
|
inline |
Invokes the depth-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 depth-first search; only meaningful if the return value is true. |
| bad_alloc | if there is not enough memory to keep building the path |
Definition at line 195 of file tpl_find_path.H.
References Aleph::Find_Path_Depth_First< GT, Itor, SA >::find().
|
private |
Definition at line 99 of file tpl_find_path.H.
Referenced by Aleph::Find_Path_Depth_First< GT, Itor, SA >::find(), and Aleph::Find_Path_Depth_First< GT, Itor, SA >::find_path().
|
private |
Definition at line 98 of file tpl_find_path.H.
Referenced by Aleph::Find_Path_Depth_First< GT, Itor, SA >::find(), and Aleph::Find_Path_Depth_First< GT, Itor, SA >::find_path().