Interface Distance<V>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Number getDistance​(V source, V target)
      Returns the distance from the source vertex to the target vertex.
      java.util.Map<V,​java.lang.Number> getDistanceMap​(V source)
      Returns a Map which maps each vertex in the graph (including the source vertex) to its distance (represented as a Number) from source.
    • Method Detail

      • getDistance

        java.lang.Number getDistance​(V source,
                                     V target)
        Returns the distance from the source vertex to the target vertex. If target is not reachable from source, returns null.
      • getDistanceMap

        java.util.Map<V,​java.lang.Number> getDistanceMap​(V source)

        Returns a Map which maps each vertex in the graph (including the source vertex) to its distance (represented as a Number) from source. If any vertex is not reachable from source, no distance is stored for that vertex.