![]() |
AlgoPlus v0.1.0
|
#include <astar.h>
Public Member Functions | |
| AStar (std::unordered_map< T, std::vector< std::pair< T, double > > > v={}, std::unordered_map< T, double > nodes={}) | |
| A* constructor. | |
| void | insert_node (T u, double val) |
| insert_node function | |
| bool | has_edge (T u, T v) |
| has_edge function | |
| void | add_edge (T u, T v, double dist) |
| add_edge function | |
| std::vector< T > | shortest_path (T start, T end) |
| shortest_path function | |
@ brief A* Class
|
inlineexplicit |
A* constructor.
| v | unordered_map<T, vector<pair<T, double> > > initializer adjacency list. Default = {} |
| nodes | unordered_map<T, double> contains the heuristic value of each node. Default = {} |
|
inline |
add_edge function
| u | the first node |
| v | the second node |
| dist | the distance between u and v |
|
inline |
has_edge function
| u | the first node |
| v | the second node |
|
inline |
insert_node function
| u | the node ID @val: the heuristic value of node u |
|
inline |
shortest_path function
| start | starting node |
| end | end node |