|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Busca en amplitud un camino entre un par de nodos. 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) |
| Invoca a la búsqueda de camino en amplitud. | |
| 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) |
| Invoca a la búsqueda de camino en amplitud. | |
| Path< GT > | operator() (const GT &g, typename GT::Node *start, typename GT::Node *end) |
| Invoca a la búsqueda de camino en amplitud. | |
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 |
Busca en amplitud un camino entre un par de nodos.
Find_Path_Breadth_First busca en amplitud un camino entre start_node y end_node, a la vez que va construyendo un camino hacia el nodo destino. Si 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 274 of file tpl_find_path.H.
|
inline |
Definition at line 358 of file tpl_find_path.H.
|
inline |
Definition at line 363 of file tpl_find_path.H.
|
inlineprivate |
Definition at line 351 of file tpl_find_path.H.
References Aleph::Find_Path_Breadth_First< GT, Itor, SA >::find_path().
|
inlineprivate |
Definition at line 279 of file tpl_find_path.H.
References ah_invalid_argument_if, ARC_BITS, 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, Aleph::maps(), 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 386 of file tpl_find_path.H.
References Aleph::Find_Path_Breadth_First< GT, Itor, SA >::find_path(), and Aleph::maps().
|
inline |
Invoca a la búsqueda de camino en amplitud.
| [in] | g | el grafo sobre el cual se desea buscar el camino. |
| [in] | start | puntero al nodo inicio del camino. |
| [in] | op | criterio de fin de búsqueda sobre el nodo visitado |
| bad_alloc | si no hay memoria para continuar construyendo el camino o para la cola interna del recorrido en amplitud. |
Definition at line 378 of file tpl_find_path.H.
References Aleph::Find_Path_Breadth_First< GT, Itor, SA >::find_path(), and Aleph::maps().
|
inline |
Invoca a la búsqueda de camino en amplitud.
| [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. |
| bad_alloc | si no hay memoria para continuar construyendo el camino o para la cola interna del recorrido en amplitud. |
Definition at line 418 of file tpl_find_path.H.
References Aleph::Find_Path_Breadth_First< GT, Itor, SA >::find_path(), and Aleph::maps().
|
inline |
Invoca a la búsqueda de camino en amplitud.
| [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 amplitud; sólo tiene sentido si el valor de retorno es true. |
| bad_alloc | si no hay memoria para continuar construyendo el camino o para la cola interna del recorrido en amplitud. |
Definition at line 403 of file tpl_find_path.H.
References Aleph::Find_Path_Breadth_First< GT, Itor, SA >::find_path().
|
private |
Definition at line 276 of file tpl_find_path.H.
Referenced by Aleph::Find_Path_Breadth_First< GT, Itor, SA >::find_path().