Heuristic<T>.any constructor

const Heuristic<T>.any(
  1. List<Heuristic<T>> heuristics
)

Returns a heuristic that uses the minimum of multiple possible goals.

This is useful when there are multiple goals and the heuristic should estimate the cost to reach the closest one; the minimum cost is used, i.e. the most optimistic estimate of the cost of any goal.

If an empty collection is used, the result is always 0.0.

Implementation

const factory Heuristic.any(List<Heuristic<T>> heuristics) = _AnyHeuristic<T>;