Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.uci.ics.jung.algorithms.shortestpath
Interface Distance

All Known Implementing Classes:
  DijkstraDistance, UnweightedShortestPath

public interface Distance

An interface for classes which calculate the distance between one vertex and another.

Author:
  Joshua O'Madadhain

Method Summary
`Number` | `getDistance(ArchetypeVertex source, ArchetypeVertex target)` Returns the distance from the `source` vertex to the `target` vertex.
`Map` | `getDistanceMap(ArchetypeVertex 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

    public Number getDistance(ArchetypeVertex source,
                              ArchetypeVertex target)

  Returns the distance from the `source` vertex to the `target` vertex. If `target` is not reachable from `source`, returns null.

### getDistanceMap

    public Map getDistanceMap(ArchetypeVertex 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD