floyd Warshall
Executes the Floyd-Warshall algorithm on the graph to compute the shortest paths between all pairs of nodes.
This function calculates the shortest path distances for every pair of nodes in the graph and stores the results in the allDistances property. The algorithm works for both weighted and unweighted graphs, but it assumes that the graph does not contain negative weight cycles.
The results can be retrieved using the distanceFromUtoV(u: T, v: T) function, which provides the shortest distance between any two nodes.
Throws
Illegal State Exception
If the graph contains nodes but no edges, making pathfinding infeasible.