|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Euclidean distance heuristic. More...
Public Types | |
| using | Distance_Type = double |
Public Member Functions | |
| Distance_Type | operator() (GridGraph::Node *from, GridGraph::Node *to) const |
Euclidean distance heuristic.
Computes straight-line distance between two nodes. Admissible for graphs allowing diagonal movement. h(n) = sqrt((x2-x1)² + (y2-y1)²)
Definition at line 171 of file astar_example.cc.
Definition at line 173 of file astar_example.cc.
|
inline |
Definition at line 175 of file astar_example.cc.
References Aleph::maps(), and sqrt().