Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Manhattan_Heuristic< GT, Distance > Struct Template Reference

Manhattan distance heuristic for A* in grid graphs. More...

#include <AStar.H>

Public Types

using Distance_Type = typename Distance::Distance_Type
 

Public Member Functions

Distance_Type operator() (typename GT::Node *from, typename GT::Node *to) const
 

Detailed Description

template<class GT, class Distance = Dft_Dist<GT>>
struct Aleph::Manhattan_Heuristic< GT, Distance >

Manhattan distance heuristic for A* in grid graphs.

Example heuristic for graphs where nodes have (x, y) coordinates and movement is restricted to horizontal/vertical directions.

Template Parameters
GTGraph type.
DistanceDistance accessor functor.

Definition at line 975 of file AStar.H.

Member Typedef Documentation

◆ Distance_Type

Definition at line 977 of file AStar.H.

Member Function Documentation

◆ operator()()

template<class GT , class Distance = Dft_Dist<GT>>
Distance_Type Aleph::Manhattan_Heuristic< GT, Distance >::operator() ( typename GT::Node from,
typename GT::Node to 
) const
inline

Definition at line 979 of file AStar.H.

References Aleph::maps().


The documentation for this struct was generated from the following file: