Interface KShortestPathAlgorithm<V,E>

Type Parameters:
V - the graph vertex type
E - the graph edge type
All Known Implementing Classes:
BhandariKDisjointShortestPaths, EppsteinKShortestPath, SuurballeKDisjointShortestPaths, YenKShortestPath

public interface KShortestPathAlgorithm<V,E>
An algorithm which computes $k$-shortest paths between vertices.
Author:
Dimitrios Michail
  • Method Summary

    Modifier and Type
    Method
    Description
    getPaths(V source, V sink, int k)
    Get a list of k-shortest paths from a source vertex to a sink vertex.
  • Method Details

    • 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 vertex
      sink - the target vertex
      k - the number of shortest paths to return
      Returns:
      a list of the k-shortest paths