|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Busca en profundidad un camino entre un par de nodos. 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) |
| Invoca a la búsqueda de camino en profundidad. | |
| Path< GT > | operator() (const GT &g, typename GT::Node *start, typename GT::Node *end) |
| Invoca a la búsqueda de camino en profundidad. | |
| template<class Op > | |
| Path< GT > | operator() (const GT &g, typename GT::Node *start, Op &op) |
| Invoca a la búsqueda de camino en profundidad. | |
| 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 |
Busca en profundidad un camino entre un par de nodos.
Find_Path_Depth_First busca en profundidad un camino entre start_node y end_node, a la vez que va construyendo un camino equivalente a la profundidad recursiva de la búsqueda. Si el se encuentra un camino, entonces el método retorna true y el parámetro path alberga el camino en cuestión; de lo contrario, la función retorna false y valor del camino es indeterminado.
La clase toma dos parámetros tipo:
Definition at line 94 of file tpl_find_path.H.
|
inline |
Definition at line 173 of file tpl_find_path.H.
|
inline |
Definition at line 178 of file tpl_find_path.H.
|
inlineprivate |
Definition at line 167 of file tpl_find_path.H.
References Aleph::Find_Path_Depth_First< GT, Itor, SA >::find().
|
inlineprivate |
Definition at line 134 of file tpl_find_path.H.
References ARC_BITS, 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, Aleph::maps(), 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 100 of file tpl_find_path.H.
References Aleph::Path< GT >::append(), ARC_BITS, 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, Aleph::maps(), 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 239 of file tpl_find_path.H.
References Aleph::maps().
|
inline |
Invoca a la búsqueda de camino en profundidad.
| [in] | g | el grafo sobre el cual se desea buscar el camino. |
| [in] | start | puntero al nodo inicio del camino. |
| [in] | op | functor que implementa el criterio de búsqueda. El functor ecibe como parámetro el nodo y debe retornar true si el nodo satisface el criterio false de lo contrario. |
| bad_alloc | si no hay memoria para continuar construyendo el camino |
Definition at line 231 of file tpl_find_path.H.
References Aleph::maps().
|
inline |
Invoca a la búsqueda de camino en profundidad.
| [in] | g | el grafo sobre el cual se desea buscar el camino. |
| [in] | start | puntero al nodo inicio del camino. |
| [in] | end | puntero al nodo destino del camino. |
end if this one was found; false otherwise | bad_alloc | si no hay memoria para continuar construyendo el camino |
Definition at line 209 of file tpl_find_path.H.
References Aleph::Find_Path_Depth_First< GT, Itor, SA >::find(), and Aleph::maps().
|
inline |
Invoca a la búsqueda de camino en profundidad.
| [in] | g | el grafo sobre el cual se desea buscar el camino. |
| [in] | start | puntero al nodo inicio del camino. |
| [in] | end | puntero al nodo destino del camino. |
| [out] | path | el camino visto durante la búsqueda en profundidad; sólo tiene sentido si el valor de retorno es true. |
| bad_alloc | si no hay memoria para continuar construyendo el camino |
Definition at line 193 of file tpl_find_path.H.
References Aleph::Find_Path_Depth_First< GT, Itor, SA >::find().
|
private |
Definition at line 97 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 96 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().