shortestPath

fun <V, E> shortestPath(graph: DirectedGraph<V, E>, start: Iterable<V>, accept: (V) -> Boolean, cost: (IEdge<V, E>) -> Double): List<V>?(source)

Return

the shortest path, if one exists, between a starting vertex and an accepted vertex, excluding trivial solutions where a starting vertex is accepted.