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

Chebyshev (L-infinity) distance heuristic for 8-connected grids. More...

#include <IDA_Star.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::Chebyshev_Heuristic< GT, Distance >

Chebyshev (L-infinity) distance heuristic for 8-connected grids.

For grids where diagonal movement is allowed, the Chebyshev distance (also called chessboard distance) is an admissible heuristic. It equals max(|dx|, |dy|).

Assumes node info has x and y fields.

Template Parameters
GTGraph type.
DistanceDistance accessor functor.

Definition at line 123 of file IDA_Star.H.

Member Typedef Documentation

◆ Distance_Type

Definition at line 125 of file IDA_Star.H.

Member Function Documentation

◆ operator()()

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

Definition at line 127 of file IDA_Star.H.

References GTNodeCommon< NodeInfo >::get_info().


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