operator * method
- double ratio
Returns a heuristic that scales the cost of another heuristic by ratio
.
The ratio
parameter can be used to scale the heuristic, making it more
or less aggressive, where the default value is 1.0
; a higher value makes
the heuristic tend to overestimate the cost, which makes algorithms like
A* run faster, while a lower value makes it tend to underestimate the cost
which makes the algorithm run slower but may find a more optimal path.
Implementation
Heuristic<T> operator *(double ratio) => scaleBy(ratio);