Interface ShortestPathAlgorithm.SingleSourcePaths<V,E>

Type Parameters:
V - the graph vertex type
E - the graph edge type
All Known Implementing Classes:
ListSingleSourcePathsImpl, TreeSingleSourcePathsImpl
Enclosing interface:
ShortestPathAlgorithm<V,E>

public static interface ShortestPathAlgorithm.SingleSourcePaths<V,E>
A set of paths starting from a single source vertex.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the graph over which this set of paths is defined.
    getPath(V sink)
    Return the path from the source vertex to the sink vertex.
    Returns the single source vertex.
    double
    getWeight(V sink)
    Return the weight of the path from the source vertex to the sink vertex.
  • Method Details

    • getGraph

      Graph<V,E> getGraph()
      Returns the graph over which this set of paths is defined.
      Returns:
      the graph
    • getSourceVertex

      V getSourceVertex()
      Returns the single source vertex.
      Returns:
      the single source vertex
    • getWeight

      double getWeight(V sink)
      Return the weight of the path from the source vertex to the sink vertex. If no such path exists, Double.POSITIVE_INFINITY is returned. The weight of the path between a vertex and itself is always zero.
      Parameters:
      sink - the sink vertex
      Returns:
      the weight of the path between source and sink vertices or Double.POSITIVE_INFINITY in case no such path exists
    • getPath

      GraphPath<V,E> getPath(V sink)
      Return the path from the source vertex to the sink vertex.
      Parameters:
      sink - the sink vertex
      Returns:
      the path from the source vertex to the sink vertex or null if no such path exists