Package org.jgrapht.alg.interfaces
Interface KShortestPathAlgorithm<V,E>
-
- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
- All Known Implementing Classes:
BhandariKDisjointShortestPaths
,EppsteinKShortestPath
,KShortestSimplePaths
,SuurballeKDisjointShortestPaths
,YenKShortestPath
public interface KShortestPathAlgorithm<V,E>
An algorithm which computes $k$-shortest paths between vertices.- Author:
- Dimitrios Michail
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<GraphPath<V,E>>
getPaths(V source, V sink, int k)
Get a list of k-shortest paths from a source vertex to a sink vertex.
-
-
-
Method Detail
-
getPaths
List<GraphPath<V,E>> getPaths(V source, V sink, int k)
Get a list of k-shortest paths from a source vertex to a sink vertex. If no such paths exist this method returns an empty list.- Parameters:
source
- the source vertexsink
- the target vertexk
- the number of shortest paths to return- Returns:
- a list of the k-shortest paths
-
-