Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
EuclideanHeuristic Struct Reference

Euclidean distance heuristic. More...

Public Types

using Distance_Type = double
 

Public Member Functions

Distance_Type operator() (GridGraph::Node *from, GridGraph::Node *to) const
 

Detailed Description

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.

Member Typedef Documentation

◆ Distance_Type

Member Function Documentation

◆ operator()()

Distance_Type EuclideanHeuristic::operator() ( GridGraph::Node from,
GridGraph::Node to 
) const
inline

Definition at line 175 of file astar_example.cc.

References Aleph::maps(), and sqrt().


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