Hyperlinkv0.8.0-beta.28

Graph

Graph.AllPairsResultinterfaceeffect/Graph.ts:3358
AllPairsResult<E>

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.

Source effect/Graph.ts:33585 lines
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>>>
}
Referenced by 1 symbols