|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
A* algorithm for finding the shortest path between two nodes. More...
#include <AStar.H>
Public Member Functions | |
| AStar_Min_Path (Distance dist=Distance(), Heuristic __heuristic=Heuristic(), SA __sa=SA()) | |
| Constructor. | |
| GT::Node * | compute_partial_path (const GT &g, typename GT::Node *start, typename GT::Node *end, GT &tree) |
| Computes the shortest path from start to end using A*. | |
| bool | paint_partial_path (const GT &g, typename GT::Node *start, typename GT::Node *end) |
| Paints the shortest path from start to end on the graph using A*. | |
| Distance::Distance_Type | find_path (const GT &g, typename GT::Node *start, typename GT::Node *end, Path< GT > &path) |
| Finds the shortest path from start to end using A*. | |
| GT::Node * | compute_path (const GT &g, typename GT::Node *start, typename GT::Node *end, GT &tree) |
| Alias for compute_partial_path (backward compatibility). | |
| bool | paint_path (const GT &g, typename GT::Node *start, typename GT::Node *end) |
| Alias for paint_partial_path (backward compatibility). | |
| GT::Node * | compute_min_paths_tree (const GT &g, typename GT::Node *start, GT &tree) |
| Computes the spanning tree of ALL shortest paths from the start node. | |
| void | compute_partial_min_paths_tree (const GT &g, typename GT::Node *start, typename GT::Node *end, GT &tree) |
| Computes the partial spanning tree from start to end (without a heuristic). | |
| bool | paint_partial_min_paths_tree (const GT &g, typename GT::Node *start, typename GT::Node *end) |
| Paints on graph g the partial shortest paths tree (without heuristic). | |
| void | paint_min_paths_tree (const GT &g, typename GT::Node *start) |
| Paints on graph g the spanning tree of ALL shortest paths starting from start (without heuristic). | |
| Distance::Distance_Type | find_min_path (const GT &g, typename GT::Node *start, typename GT::Node *end, Path< GT > &min_path) |
| Computes shortest path by painting the graph (without heuristic). | |
| void | operator() (const GT &g, typename GT::Node *s, GT &tree) |
| Computes the spanning tree of all shortest paths. | |
| Distance::Distance_Type | operator() (const GT &g, typename GT::Node *s, typename GT::Node *e, Path< GT > &path) |
| Finds shortest path using A* heuristic. | |
| bool | has_computation () const noexcept |
| Check if a computation has been performed. | |
| bool | is_painted () const noexcept |
| Check if the graph has been painted. | |
| GT::Node * | get_start_node () const noexcept |
| Get the start node of the last computation. | |
| GT * | get_graph () const noexcept |
| Get the graph of the last computation. | |
| Distance::Distance_Type | get_distance (typename GT::Node *node) |
| Gets the accumulated distance to a node after painting. | |
| Distance::Distance_Type | get_min_path (typename GT::Node *end, Path< GT > &path) |
| Extracts a shortest path to end from a previously painted graph. | |
| Distance::Distance_Type | get_min_path (const GT &tree, typename GT::Node *end, Path< GT > &path) |
| Extracts path from tree to end node. | |
| Distance::Distance_Type | copy_painted_min_paths_tree (GT &g, GT &tree) |
| Extracts the painted shortest paths tree and puts it in tree. | |
Public Member Functions inherited from Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT > | |
| Shortest_Path_Base (Distance dist=Distance(), SA __sa=SA()) | |
| Default constructor. | |
| bool | has_computation () const noexcept |
| Check if a computation has been performed. | |
| bool | is_painted () const noexcept |
| Check if the graph has been painted. | |
| GT::Node * | get_start_node () const noexcept |
| Get the start node of the last computation. | |
| GT * | get_graph () const noexcept |
| Get the graph of the last computation. | |
| Distance::Distance_Type | get_distance (typename GT::Node *node) |
| Gets the accumulated distance to a node after painting. | |
| Distance::Distance_Type | get_min_path (typename GT::Node *end, Path< GT > &path) |
| Extracts a shortest path to end from a previously painted graph. | |
| Distance::Distance_Type | copy_painted_min_paths_tree (GT &g, GT &tree) |
| Extracts the painted shortest paths tree and puts it in tree. | |
| Distance::Distance_Type | get_min_path (const GT &tree, typename GT::Node *end, Path< GT > &path) |
| Extracts path from tree to end node. | |
Private Types | |
| using | Base = Shortest_Path_Base< GT, Distance, Itor, SA, HeapT > |
Private Member Functions | |
| void | check_heuristic_admissibility (typename GT::Node *node, typename GT::Node *goal, const typename Distance::Distance_Type &actual_cost) |
Private Attributes | |
| Heuristic | heuristic |
| bool | validate_heuristic = true |
| SA | sa |
| Arc filter. | |
| Heap | heap |
| Priority queue. | |
| bool | painted |
| Whether graph has been painted. | |
| GT * | ptr_g |
| Pointer to the graph. | |
| GT::Node * | s |
| Start node. | |
Additional Inherited Members | |
Public Types inherited from Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT > | |
| using | Heap = HeapT< GT, Get_Potential_Arc, Heap_Info > |
Protected Member Functions inherited from Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT > | |
| template<class IN , class IA > | |
| void | init (const GT &g, typename GT::Node *start) |
| Initialize algorithm state. | |
| template<class DN , class DA > | |
| auto | uninit_on_exit () |
| Returns a guard that calls uninit() when it goes out of scope. | |
| template<class DN , class DA > | |
| void | uninit () |
| Cleanup algorithm state. | |
| bool | add_if_fits (const typename Distance::Distance_Type &a, const typename Distance::Distance_Type &b, typename Distance::Distance_Type &out) |
| Adds a tentative distance that may go beyond max(). | |
| void | check_beyond_max (const GT &g, typename GT::Node *start, typename GT::Node *end=nullptr) const |
After a painting in which a sum went beyond max(), throws if a node that start reaches was left out, or end if it is given. | |
| Distance::Distance_Type | checked_add (const typename Distance::Distance_Type &a, const typename Distance::Distance_Type &b) const |
| Checked addition to prevent integer overflow. | |
Protected Attributes inherited from Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT > | |
| SA | sa |
| Arc filter. | |
| Distance | distance |
| Arc weights. | |
| Get_Potential_Arc | get_pot |
| Potential accessor. | |
| Heap | heap |
| Priority queue. | |
| bool | painted = false |
| Whether graph has been painted. | |
| GT * | ptr_g = nullptr |
| Pointer to the graph. | |
| GT::Node * | s = nullptr |
| Start node. | |
| bool | beyond_max = false |
| A sum of the painting went beyond max() | |
| bool | leave_out_beyond_max = false |
| Whether a painting leaves out without throwing the nodes whose distance does not fit. | |
A* algorithm for finding the shortest path between two nodes.
This class implements the A* algorithm to find the shortest path from a source node start to a destination node end in a weighted graph.
A* uses a heuristic function h(n) that estimates the cost from node n to the goal. The algorithm expands nodes in order of f(n) = g(n) + h(n) where g(n) is the actual cost from start to n.
For the algorithm to find optimal paths, the heuristic must be admissible (never overestimate the true cost) and consistent (satisfy h(n) <= d(n,m) + h(m) for any edge n->m).
This class also provides Dijkstra-compatible methods (compute_min_paths_tree, paint_min_paths_tree) that use zero heuristic for computing all shortest paths from a source.
A* Methods (with heuristic, for single-target search):
find_path() - Find shortest path start->end (recommended)compute_partial_path() - Same but builds tree structurepaint_partial_path() - Same but marks on original graphDijkstra Methods (no heuristic, for multi-target search):
find_min_path() - Find path without heuristiccompute_min_paths_tree() - Build complete shortest paths treepaint_min_paths_tree() - Mark complete tree on graphcompute_partial_min_paths_tree() - Build partial tree until target foundpaint_partial_min_paths_tree() - Mark partial tree on graphThe "partial" methods stop as soon as the target node is reached, while "complete" methods explore all reachable nodes.
The class receives the following template parameters:
GT: graph type.Distance<GT>: class reading the weight.Heuristic<GT, Distance>: heuristic functor.Itor<GT, SA>: arc iterator type (defaults to Node_Arc_Iterator).SA: arc filter for internal iterators.HeapT<GT, Distance, Access>: priority-queue adapter.Distance, Heuristic or the filter), the cookies it set are freed and the graph can be used again; a tree being built keeps the part already built. With a filter that can throw (see nothrow_arc_filter_v), a method marks with the bit Min the arcs to which it gives a cookie, and frees them by that mark, without calling the filter again; the mark stays.Distance_Type, a tentative sum beyond max() does not throw by itself: std::overflow_error comes only when the distance to a node that the start reaches, or to the end, does not fit. The methods with a heuristic leave out an arc whose g + h does not fit: if the heuristic does not overestimate, no path through it fits, and with one that overestimates, they can throw for an end whose distance fits.
|
private |
|
inline |
|
inlineprivate |
Definition at line 218 of file AStar.H.
References Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::heuristic, and Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::validate_heuristic.
|
inline |
Computes the spanning tree of ALL shortest paths from the start node.
This method uses zero heuristic, making it equivalent to Dijkstra's algorithm. Use this when you need the complete shortest paths tree from a source to all reachable nodes.
| [in] | g | The graph. |
| [in] | start | The starting node for all shortest paths. |
| [out] | tree | The spanning tree of all shortest paths starting from start, mapped via cookies to the graph g. |
| bad_alloc | If there is not enough memory. |
| domain_error | If start is nullptr or g is empty. |
Definition at line 556 of file AStar.H.
References AACC, AARC_DIST, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::add_if_fits(), ah_domain_error_if, Aleph::and, APOT, ARC_BITS, ATREEARC, ATREENODE, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::beyond_max, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::check_beyond_max(), Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::checked_add(), Aleph::clear_graph(), GTNodeCommon< NodeInfo >::get_info(), GraphCommon< GT, Node, Arc >::get_num_nodes(), GraphCommon< GT, Node, Arc >::get_src_node(), GraphCommon< GT, Node, Arc >::get_tgt_node(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::heap, Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), IS_ARC_VISITED, IS_NODE_VISITED, NODE_BITS, NODE_COOKIE, Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::sa, and Aleph::Spanning_Tree.
Referenced by main(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::operator()(), TEST(), TEST(), TEST_F(), and TEST_F().
|
inline |
Computes the partial spanning tree from start to end (without a heuristic).
Uses Dijkstra's algorithm (zero heuristic) but stops when end is reached.
| [in] | g | The graph. |
| [in] | start | The starting node. |
| [in] | end | The destination node. |
| [out] | tree | The partial spanning tree. |
| bad_alloc | If there is not enough memory. |
| domain_error | If start or end is nullptr, or g is empty. |
Definition at line 643 of file AStar.H.
References AACC, AARC_DIST, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::add_if_fits(), ah_domain_error_if, Aleph::and, APOT, ARC_BITS, ATREEARC, ATREENODE, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::beyond_max, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::check_beyond_max(), Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::checked_add(), Aleph::clear_graph(), GTNodeCommon< NodeInfo >::get_info(), GraphCommon< GT, Node, Arc >::get_num_nodes(), GraphCommon< GT, Node, Arc >::get_src_node(), GraphCommon< GT, Node, Arc >::get_tgt_node(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::heap, Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), IS_ARC_VISITED, IS_NODE_VISITED, NODE_BITS, NODE_COOKIE, Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::sa, and Aleph::Spanning_Tree.
Referenced by TEST_F().
|
inline |
Computes the shortest path from start to end using A*.
Builds a partial spanning tree containing the shortest path from start to end, stopping as soon as end is reached.
| [in] | g | The graph. |
| [in] | start | The starting node. |
| [in] | end | The destination node. |
| [out] | tree | The partial tree containing the path, mapped to g. |
| bad_alloc | If there is not enough memory. |
| domain_error | If start or end is nullptr, or g is empty. |
Definition at line 280 of file AStar.H.
References AACC, AARC_DIST, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::add_if_fits(), ah_domain_error_if, Aleph::and, APOT, ARC_BITS, ATREEARC, ATREENODE, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::beyond_max, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::check_beyond_max(), Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::checked_add(), Aleph::clear_graph(), GTNodeCommon< NodeInfo >::get_info(), GraphCommon< GT, Node, Arc >::get_num_nodes(), GraphCommon< GT, Node, Arc >::get_src_node(), GraphCommon< GT, Node, Arc >::get_tgt_node(), h, Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::heap, Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::heuristic, Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), IS_ARC_VISITED, IS_NODE_VISITED, NODE_BITS, NODE_COOKIE, Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::sa, and Aleph::Spanning_Tree.
Referenced by Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::compute_path(), and TEST().
|
inline |
Alias for compute_partial_path (backward compatibility).
Definition at line 523 of file AStar.H.
References Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::compute_partial_path().
Referenced by TEST_F().
|
inline |
Extracts the painted shortest paths tree and puts it in tree.
Only the nodes that the painting reaches are copied, as compute_min_paths_tree() does. The nodes and arcs of g and of tree are mapped through their cookies; the cookies of the nodes that are not reached are null. Since the cookies held the painting, the painting cannot be used afterwards and is_painted() becomes false.
| [in] | g | The previously painted graph. |
| [out] | tree | The graph where the spanning tree will be copied. |
| bad_alloc | If there is not enough memory. |
| domain_error | If the graph has not been previously painted. |
Definition at line 863 of file shortest_path_common.H.
|
inline |
Computes shortest path by painting the graph (without heuristic).
Dijkstra-compatible interface.
| [in] | g | The graph. |
| [in] | start | The starting node. |
| [in] | end | The destination node. |
| [out] | min_path | The shortest path. |
| bad_alloc | If there is not enough memory. |
Definition at line 924 of file AStar.H.
References Aleph::Path< GT >::empty(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::get_min_path(), and Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::paint_partial_min_paths_tree().
|
inline |
Finds the shortest path from start to end using A*.
This is the recommended entry point for A* with heuristic. It paints the graph and extracts the path in one call.
| [in] | g | The graph. |
| [in] | start | The starting node. |
| [in] | end | The destination node. |
| [out] | path | The shortest path (empty if no path exists). |
| bad_alloc | If there is not enough memory. |
Definition at line 505 of file AStar.H.
References Aleph::Path< GT >::empty(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::get_min_path(), and Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::paint_partial_path().
Referenced by main(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::operator()(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
inline |
Gets the accumulated distance to a node after painting.
After painting the graph with a shortest path tree, this method traverses the path from the start node to the given node and computes the total distance.
| [in] | node | The destination node. |
| domain_error | If the graph has not been painted or if node is not reachable from the start node. |
Definition at line 730 of file shortest_path_common.H.
|
inlinenoexcept |
Get the graph of the last computation.
Definition at line 710 of file shortest_path_common.H.
Referenced by TEST_F().
|
inline |
Extracts path from tree to end node.
| [in] | tree | The spanning tree built by compute_min_paths_tree. |
| [in] | end | Destination node (in original graph). |
| [out] | path | Path where result will be stored (in original graph), made of the arcs of g that those of the tree map to. |
g. | domain_error | If the minimum paths tree has not been computed, or end is not in the tree, nor reached in it from the start. |
| bad_alloc | If there is not enough memory. |
Definition at line 901 of file shortest_path_common.H.
|
inline |
Extracts a shortest path to end from a previously painted graph.
Takes a graph on which shortest paths have been painted and extracts the shortest path to end, storing it in path.
| [in] | end | Destination node of the path. |
| [out] | path | Path where the shortest path will be stored. |
| bad_alloc | If there is not enough memory. |
| domain_error | If the graph has not been previously painted. |
Definition at line 781 of file shortest_path_common.H.
Referenced by Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::find_min_path(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::find_path(), main(), TEST(), TEST_F(), TEST_F(), and TEST_F().
|
inlinenoexcept |
Get the start node of the last computation.
Definition at line 705 of file shortest_path_common.H.
|
inlinenoexcept |
Check if a computation has been performed.
Definition at line 690 of file shortest_path_common.H.
|
inlinenoexcept |
Check if the graph has been painted.
Every computation resets the bits and cookies of the previous one, so only a painting that ended normally can be used.
Definition at line 700 of file shortest_path_common.H.
|
inline |
Computes the spanning tree of all shortest paths.
Dijkstra-compatible operator interface.
| [in] | g | The graph. |
| [in] | s | The starting node. |
| [out] | tree | The spanning tree. |
Definition at line 948 of file AStar.H.
References Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::compute_min_paths_tree(), and Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::s.
|
inline |
Finds shortest path using A* heuristic.
| [in] | g | The graph. |
| [in] | s | The starting node. |
| [in] | e | The destination node. |
| [out] | path | The shortest path. |
Definition at line 961 of file AStar.H.
References Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::find_path(), and Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::s.
|
inline |
Paints on graph g the spanning tree of ALL shortest paths starting from start (without heuristic).
Uses Dijkstra's algorithm (zero heuristic).
| [in] | g | The graph. |
| [in] | start | The starting node. |
| bad_alloc | If there is not enough memory. |
| domain_error | If start is nullptr or g is empty. |
Definition at line 844 of file AStar.H.
References AACC, AARC_DIST, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::add_if_fits(), ah_domain_error_if, Aleph::and, APARENT, APOT, ARC_BITS, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::beyond_max, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::check_beyond_max(), Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::checked_add(), GraphCommon< GT, Node, Arc >::get_num_nodes(), GraphCommon< GT, Node, Arc >::get_src_node(), GraphCommon< GT, Node, Arc >::get_tgt_node(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::heap, IS_ARC_VISITED, IS_NODE_VISITED, NODE_BITS, Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::painted, Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::sa, and Aleph::Spanning_Tree.
Referenced by TEST(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
inline |
Paints on graph g the partial shortest paths tree (without heuristic).
Uses Dijkstra's algorithm but stops when end is reached.
| [in] | g | The graph. |
| [in] | start | The starting node. |
| [in] | end | The destination node. |
| bad_alloc | If there is not enough memory. |
| domain_error | If start or end is nullptr, or g is empty. |
Definition at line 744 of file AStar.H.
References AACC, AARC_DIST, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::add_if_fits(), ah_domain_error_if, Aleph::and, APARENT, APOT, ARC_BITS, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::beyond_max, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::check_beyond_max(), Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::checked_add(), GraphCommon< GT, Node, Arc >::get_num_nodes(), GraphCommon< GT, Node, Arc >::get_src_node(), GraphCommon< GT, Node, Arc >::get_tgt_node(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::heap, IS_ARC_VISITED, IS_NODE_VISITED, NODE_BITS, Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::painted, Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::sa, and Aleph::Spanning_Tree.
Referenced by Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::find_min_path(), and TEST_F().
|
inline |
Paints the shortest path from start to end on the graph using A*.
This is the memory-efficient version that marks the path directly on the graph using spanning tree bits.
| [in] | g | The graph. |
| [in] | start | The starting node. |
| [in] | end | The destination node. |
| bad_alloc | If there is not enough memory. |
| domain_error | If start or end is nullptr, or g is empty. |
Definition at line 398 of file AStar.H.
References AACC, AARC_DIST, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::add_if_fits(), ah_domain_error_if, Aleph::and, APARENT, APOT, ARC_BITS, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::beyond_max, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::check_beyond_max(), Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::checked_add(), GraphCommon< GT, Node, Arc >::get_num_nodes(), GraphCommon< GT, Node, Arc >::get_src_node(), GraphCommon< GT, Node, Arc >::get_tgt_node(), h, Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::heap, Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::heuristic, IS_ARC_VISITED, IS_NODE_VISITED, NODE_BITS, Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::painted, Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::sa, and Aleph::Spanning_Tree.
Referenced by Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::find_path(), and Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::paint_path().
|
inline |
|
private |
Priority queue.
Definition at line 433 of file shortest_path_common.H.
Referenced by Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::compute_min_paths_tree(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::compute_partial_min_paths_tree(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::compute_partial_path(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::paint_min_paths_tree(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::paint_partial_min_paths_tree(), and Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::paint_partial_path().
|
private |
Definition at line 212 of file AStar.H.
Referenced by Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::check_heuristic_admissibility(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::compute_partial_path(), and Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::paint_partial_path().
|
private |
Whether graph has been painted.
Definition at line 434 of file shortest_path_common.H.
Referenced by Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::paint_min_paths_tree(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::paint_partial_min_paths_tree(), and Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::paint_partial_path().
|
private |
Pointer to the graph.
Definition at line 435 of file shortest_path_common.H.
|
private |
Start node.
Definition at line 436 of file shortest_path_common.H.
Referenced by Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::operator()(), and Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::operator()().
|
private |
Arc filter.
Definition at line 430 of file shortest_path_common.H.
Referenced by Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::compute_min_paths_tree(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::compute_partial_min_paths_tree(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::compute_partial_path(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::paint_min_paths_tree(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::paint_partial_min_paths_tree(), and Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::paint_partial_path().
|
private |
Definition at line 216 of file AStar.H.
Referenced by Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::check_heuristic_admissibility().