package graphs.shortestpaths; import graphs.BaseEdge; import graphs.Edge; import graphs.Graph; /** * Interface for finding a shortest path between two vertices of a graph. * * @param The graph type. Must be a subtype of {@link Graph}. * @param The vertex type. * @param The edge type. Must be a subtype of {@link Edge}. */ public interface ShortestPathFinder, V, E extends BaseEdge> { /** * Computes a shortest path from start to end in given graph, and returns a ShortestPath object * that can be queried for the list of edges or vertices along the path, or its total weight. * * Alternatively, if no path exists in the graph from start to end, the returned ShortestPath * will have {@link ShortestPath#exists()} false. */ ShortestPath findShortestPath(G graph, V start, V end); }