Package: effect
Module: Graph
Result of an all-pairs shortest path computation.
When to use
Use when storing or passing around the complete output of floydWarshall so
callers can look up shortest distances, node paths, and edge data for any
source and target node pair.
Details
Contains distance, node-path, and edge-data maps keyed by source and target node indices.
See
floydWarshall for computing an all-pairs shortest path resultPathResult for the single source-to-target result shape used by path-finding algorithmsSignature
export interface AllPairsResult<E> {
readonly distances: Map<NodeIndex, Map<NodeIndex, number>>
readonly paths: Map<NodeIndex, Map<NodeIndex, Array<NodeIndex> | null>>
readonly costs: Map<NodeIndex, Map<NodeIndex, Array<E>>>
}
Since v3.18.0