Documentation of 'org.jgrapht.alg.shortestpath.ListSingleSourcePathsImpl' Java class
ListSingleSourcePathsImpl
org.jgrapht.alg.shortestpath

Class ListSingleSourcePathsImpl<V,E>

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      Graph<V,E> getGraph()
      Returns the graph over which this set of paths is defined.
      GraphPath<V,E> getPath(V targetVertex)
      Return the path from the source vertex to the sink vertex.
      V getSourceVertex()
      Returns the single source vertex.
      double getWeight(V targetVertex)
      Return the weight of the path from the source vertex to the sink vertex.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ListSingleSourcePathsImpl

        public ListSingleSourcePathsImpl(Graph<V,E> graph,
                                         V source,
                                         java.util.Map<V,GraphPath<V,E>> paths)
        Construct a new instance.
        Parameters:
        graph - the graph
        source - the source vertex
        paths - one path per target vertex
    • Method Detail

      • getWeight

        public double getWeight(V targetVertex)
        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.
        Specified by:
        getWeight in interface ShortestPathAlgorithm.SingleSourcePaths<V,E>
        Parameters:
        targetVertex - 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

        public GraphPath<V,E> getPath(V targetVertex)
        Return the path from the source vertex to the sink vertex.
        Specified by:
        getPath in interface ShortestPathAlgorithm.SingleSourcePaths<V,E>
        Parameters:
        targetVertex - the sink vertex
        Returns:
        the path from the source vertex to the sink vertex or null if no such path exists

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.