pub struct AllPairsShortestPaths(_);
Expand description

The all-pairs shortest paths on the static graph described above will always be an admissible heuristic for the dynamic graph as long as the statically closed tiles are never unblocked.

This heuristic is extremely valuable for the use case described in this module. Imagine the following scenario:

____________
|e X   start|
|n X        |
|d X        |
|  XXXXXXX  |
|           |
-------------

The HammingDistance heuristic will send you looking all throughout the top right region before you realize you’re meant to go around, whereas the all pairs metric will immediately be able to bypass this obstacle. In the presence of dynamically but not statically blocked tiles, we can run into these problems again easily, but we avoid them in many cases even then.

Correctness: When you use this heuristic, you should be careful to ensure that the dynamically open positions are a subset of the statically open positions.

Implementations

Trait Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.