Interface ManyToManyShortestPathsAlgorithm.ManyToManyShortestPaths<V,​E>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      GraphPath<V,​E> getPath​(V source, V target)
      Return the path from the source vertex to the target vertex.
      java.util.Set<V> getSources()
      Returns the set of source vertices for which this many-to-many shortest paths were computed.
      java.util.Set<V> getTargets()
      Returns the set of target vertices for which this many-to-many shortest paths were computed.
      double getWeight​(V source, V target)
      Return the weight of the path from the source vertex to the targetvertex or Double.POSITIVE_INFINITY if there is no such path in the graph.
    • Method Detail

      • getSources

        java.util.Set<V> getSources()
        Returns the set of source vertices for which this many-to-many shortest paths were computed.
        Returns:
        the set of source vertices
      • getTargets

        java.util.Set<V> getTargets()
        Returns the set of target vertices for which this many-to-many shortest paths were computed.
        Returns:
        the set of target vertices
      • getPath

        GraphPath<V,​E> getPath​(V source,
                                     V target)
        Return the path from the source vertex to the target vertex. If no such path exists, null is returned.
        Parameters:
        source - source vertex
        target - target vertex
        Returns:
        path between source and target or null if no such path exists
      • getWeight

        double getWeight​(V source,
                         V target)
        Return the weight of the path from the source vertex to the targetvertex or Double.POSITIVE_INFINITY if there is no such path in the graph. The weight of the path between a vertex and itself is always zero.
        Parameters:
        source - source vertex
        target - target vertex
        Returns:
        the weight of the path between source and sink vertices or Double.POSITIVE_INFINITY in case no such path exists