Hyperlinkv0.8.0-beta.28

Graph

Graph.PathResultinterfaceeffect/Graph.ts:3115
PathResult<E>

Result of a shortest path computation.

When to use

Use to read the successful source-to-target shortest path returned by path-finding algorithms, including the ordered node indices, total distance, and traversed edge data.

Details

Contains the node-index path, the total numeric distance, and the edge data encountered along the path.

Gotchas

costs contains original edge data, not the numeric output of the cost function unless the edge data is numeric.

Source effect/Graph.ts:31155 lines
export interface PathResult<E> {
  readonly path: Array<NodeIndex>
  readonly distance: number
  readonly costs: Array<E>
}
Referenced by 3 symbols