Class ShortestPathInfo<N extends DirectedGraphNode,​E extends DirectedGraphEdge<? extends N,​? extends N>>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int NOPATH  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<N> getShortestPath​(N source, N target)
      Returns the shortest path from the source to the target.
      int getShortestPathLength​(N source, N target)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getShortestPathLength

        public int getShortestPathLength​(N source,
                                         N target)
      • getShortestPath

        public java.util.List<N> getShortestPath​(N source,
                                                 N target)
        Returns the shortest path from the source to the target. If source.equals(target), then a list of length 1 is returned. Otherwise, the list returned contains the nodes from source to target that make up the path, including source as the first node and target as the last node. If no path exist, an empty list is returned.
        Parameters:
        source -
        target -
        Returns: