Closed arnaudgolfouse closed 4 years ago
Removing the id
field from QueuePriority
breaks some behavior of the algorithm. The id
is a tie-breaker when multiple paths have the same cost
. It guarantees that a graph with the same points (with identical point ids), connections and weights produces the same shortest paths.
Without this, the shortest paths map may depend on order in which the connections were created, because Hashsets that store neighboring points do not guarantee consistent iteration order.
This determinism is rarely something you care about in practice... until you do...
Removing the
id
field fromQueuePriority
breaks some behavior of the algorithm. Theid
is a tie-breaker when multiple paths have the samecost
. It guarantees that a graph with the same points (with identical point ids), connections and weights produces the same shortest paths. Without this, the shortest paths map may depend on order in which the connections were created, because Hashsets that store neighboring points do not guarantee consistent iteration order.This determinism is rarely something you care about in practice... until you do...
Ah I see... Do you want me to revert it ?
This is (mostly) a change in documentation.
The main improvement is the use of the new (1.48) linking method of rustdoc.