dijkstraShortestPath

fun <T> dijkstraShortestPath(start: T, isGoal: Predicate<T>, neighbors: (T) -> Iterable<WeightedEdge<T>>, maxIterations: Int = Int.MAX_VALUE, maxCost: Double = Double.POSITIVE_INFINITY): ShortestPath<T>?

Returns the shortest path from start to the first node where isGoal returns true.

All edge costs must be non-negative.