#include <graph_search.H>
Classes | |
| class | node_containter_t |
| class | search_node_t |
| Search node to keep track of graph's nodes. More... | |
Public Member Functions | |
| graph_search_t (graph_t< ID_T > *graph_) | |
| void | print_graph () |
| Print the nodes visited by the graph search. | |
| bool | search_graph (typename graph_t< ID_T >::vertex_t *start_gn, typename graph_t< ID_T >::vertex_t *end_gn, std::deque< ID_T > &path_) |
| Finds the path from 'start_id' to 'end_id' in the graph and returns the path in 'path_' variable. | |
| void | clear_all_nodes () |
| Delete the memory allocated to record search nodes, and clears the m_all_nodes vector. | |
Private Member Functions | |
| search_node_t * | get_search_node (typename graph_t< ID_T >::vertex_t *node_) |
| bool | update_cost (search_node_t *node_src_, search_node_t *node_dest_, typename graph_t< ID_T >::edge_t *edge_) |
| updates the cost of the edge between node_src and node_dest nodes | |
| void | extract_path (std::deque< ID_T > &path_, search_node_t *last_node_) |
| Extracts the path from given 'last_node' to first node of graph search, by following the 'prev_s_node' variable of each node which stores the pointer to parent node which contributed to the cost of present node. | |
| void | add_to_cont_list (search_node_t *node, std::deque< node_containter_t > &node_cont_list) |
| Search if 'node' is already in the node_cont_list, if not adds it to it. | |
Private Attributes | |
| graph_t< ID_T > * | m_graph |
| std::vector< search_node_t * > | m_all_nodes |
| cajun::graph_search_t< ID_T >::graph_search_t | ( | graph_t< ID_T > * | graph_ | ) | [inline] |
| void cajun::graph_search_t< ID_T >::add_to_cont_list | ( | search_node_t * | node, | |
| std::deque< node_containter_t > & | node_cont_list | |||
| ) | [inline, private] |
Search if 'node' is already in the node_cont_list, if not adds it to it.
Referenced by cajun::graph_search_t< rp_containter_t >::search_graph().
| void cajun::graph_search_t< ID_T >::clear_all_nodes | ( | ) | [inline] |
Delete the memory allocated to record search nodes, and clears the m_all_nodes vector.
Referenced by cajun::graph_search_t< rp_containter_t >::search_graph().
| void cajun::graph_search_t< ID_T >::extract_path | ( | std::deque< ID_T > & | path_, | |
| search_node_t * | last_node_ | |||
| ) | [inline, private] |
Extracts the path from given 'last_node' to first node of graph search, by following the 'prev_s_node' variable of each node which stores the pointer to parent node which contributed to the cost of present node.
Referenced by cajun::graph_search_t< rp_containter_t >::search_graph().
| search_node_t* cajun::graph_search_t< ID_T >::get_search_node | ( | typename graph_t< ID_T >::vertex_t * | node_ | ) | [inline, private] |
Referenced by cajun::graph_search_t< rp_containter_t >::search_graph().
| void cajun::graph_search_t< ID_T >::print_graph | ( | ) | [inline] |
Print the nodes visited by the graph search.
Referenced by cajun::graph_search_t< rp_containter_t >::search_graph().
| bool cajun::graph_search_t< ID_T >::search_graph | ( | typename graph_t< ID_T >::vertex_t * | start_gn, | |
| typename graph_t< ID_T >::vertex_t * | end_gn, | |||
| std::deque< ID_T > & | path_ | |||
| ) | [inline] |
Finds the path from 'start_id' to 'end_id' in the graph and returns the path in 'path_' variable.
| bool cajun::graph_search_t< ID_T >::update_cost | ( | search_node_t * | node_src_, | |
| search_node_t * | node_dest_, | |||
| typename graph_t< ID_T >::edge_t * | edge_ | |||
| ) | [inline, private] |
updates the cost of the edge between node_src and node_dest nodes
Referenced by cajun::graph_search_t< rp_containter_t >::search_graph().
std::vector<search_node_t *> cajun::graph_search_t< ID_T >::m_all_nodes [private] |
graph_t<ID_T>* cajun::graph_search_t< ID_T >::m_graph [private] |
1.6.1