Computes all-pairs shortest paths for a given graph using Floyd-Warshall algorithm. The ordered array of nodes and 2D Array of distances where each row and column index corresponds to a node's index in the nodes array.
Constructor | Description |
|
|
Static member | Description |
Full Usage:
FloydWarshall.compute ()
Returns: int
|
|
Full Usage:
FloydWarshall.fromArray2D graph
Parameters:
float[,]
-
The graph for which to compute the shortest path.
Returns: float[,]
The ordered array of nodes and 2D Array of distances where each
row and column index corresponds to a node's index in the nodes array.
|
If there isn't a path between two edges, the distance is set to `infinity`.
|
Full Usage:
FloydWarshall.fromJaggedArray graph
Parameters:
float[][]
-
The graph for which to compute the shortest path.
Returns: float[][]
The ordered array of nodes and 2D Array of distances where each
row and column index corresponds to a node's index in the nodes array.
|
If there isn't a path between two edges, the distance is set to `infinity`.
|