public interface Distance<V>
| Modifier and Type | Method and Description |
|---|---|
Number |
getDistance(V source,
V target)
Returns the distance from the
source vertex to the
target vertex. |
Map<V,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. |
Number getDistance(V source, V target)
source vertex to the
target vertex. If target is not reachable from
source, returns null.source - the vertex from which distance is to be measuredtarget - the vertex to which distance is to be measuredsource to targetMap<V,Number> getDistanceMap(V source)
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.source - the vertex from which distances are to be measuredMap of the distances from source to other vertices in the graphCopyright © 2016. All rights reserved.