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.

Mixed in types

Constructors

GridHeuristic.chebyshev(Pos goal, {double ratio})
Uses distanceChebyshev distance to estimate the total cost.
const
factory
GridHeuristic.diagonal(Pos goal, {double ratio})
Uses distanceDiagonal distance to estimate the total cost.
const
factory
GridHeuristic.euclidean(Pos goal, {double ratio})
Uses euclidean (√ of distanceSquared) distance to estimate the total cost.
const
factory
GridHeuristic.manhattan(Pos goal, {double ratio})
Uses distanceManhattan to estimate the total cost.
const
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
ratio → double
The ratio the heuristic is scaling by.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

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