distanceFromUtoV

fun distanceFromUtoV(u: T, v: T): Double

Retrieves the shortest distance between two nodes in the graph.

This function uses the results of the Floyd-Warshall algorithm to determine the shortest path distance between the specified nodes.

Return

The shortest distance between the two nodes.

Parameters

u

The starting node.

v

The target node.

Throws

IllegalStateException

If the Floyd-Warshall algorithm has not been executed before calling this function.