distanceTo

fun distanceTo(node: T): Double

Retrieves the distance to the specified node from the starting node of the most recent search operation (BFS, DFS, shortestPathsFrom).

Return

The distance to the specified node, or Double.POSITIVE_INFINITY if no path to the node has been found, the node is not in the graph, or no search has been run.

Parameters

node

The target node whose distance is to be retrieved.