GridHeuristic class abstract final Pathfinding
A heuristic that estimates the minimum total cost of reaching a Pos goal.
This is a common heuristic used in grid-based pathfinding algorithms.
Constructors
- GridHeuristic.chebyshev(Pos goal, {double ratio})
-
Uses distanceChebyshev distance to estimate the total cost.
constfactory
- GridHeuristic.diagonal(Pos goal, {double ratio})
-
Uses distanceDiagonal distance to estimate the total cost.
constfactory
- GridHeuristic.euclidean(Pos goal, {double ratio})
-
Uses
euclidean
(√
of distanceSquared) distance to estimate the total cost.constfactory - GridHeuristic.manhattan(Pos goal, {double ratio})
-
Uses distanceManhattan to estimate the total cost.
constfactory
Properties
Methods
-
estimateTotalCost(
Pos node) → double -
Estimates the minimum total cost of reaching the goal from
node
.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
scaleBy(
double ratio) → Heuristic< Pos> -
Returns a heuristic that scales the cost of another heuristic by
ratio
.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator *(
double ratio) → Heuristic< Pos> -
Returns a heuristic that scales the cost of another heuristic by
ratio
.inherited -
operator ==(
Object other) → bool -
The equality operator.
inherited