shortestPath method

List<Vertex<T>> shortestPath(
  1. Vertex<T> start,
  2. Vertex<T> target
)

Returns the shortest path between start and target. Returns null if start is not connected to target.

Implementation

List<Vertex<T>> shortestPath(Vertex<T> start, Vertex<T> target) {
  return graphs.shortestPath<Vertex<T>>(start, target, edges);
}