|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Manhattan distance heuristic. More...
Public Types | |
| using | Distance_Type = double |
Public Member Functions | |
| Distance_Type | operator() (GridGraph::Node *from, GridGraph::Node *to) const |
Manhattan distance heuristic.
Computes taxi-cab distance (only horizontal/vertical moves). Optimal for 4-connected grids where diagonal movement is not allowed. h(n) = |x2-x1| + |y2-y1|
Definition at line 192 of file astar_example.cc.
Definition at line 194 of file astar_example.cc.
|
inline |
Definition at line 196 of file astar_example.cc.
References abs(), and Aleph::maps().