@graphty/algorithms / index / floydWarshallPath
Function: floydWarshallPath() ​
floydWarshallPath(
graph,source,target): {distance:number;path:NodeId[]; } |null
Defined in: algorithms/shortest-path/floyd-warshall.ts:120
Finds the shortest path between two nodes using Floyd-Warshall
Parameters ​
graph ​
The graph to search
source ​
The starting node for the path
target ​
The destination node for the path
Returns ​
{ distance: number; path: NodeId[]; } | null
The path and distance or null if no path exists