本文へ移動

@eightkk/vue-weave / core / shortestGraphPath

Function: shortestGraphPath() ​

shortestGraphPath(nodes, edges, fromId, toId, options?): GraphPathResult | null

Defined in: src/core/graphAlgorithms.ts:71

Cheapest path between two nodes, or null when the target is unreachable. Ties favour earlier edges in input order.

Parameters ​

nodes ​

readonly IdentifiedNode[]

edges ​

readonly GraphEdge<unknown>[]

fromId ​

string

toId ​

string

options? ​

ShortestGraphPathOptions = {}

Returns ​

GraphPathResult | null

MIT ライセンスで公開しています。