Interface NearbyDistanceMeter<O,D>
-
public interface NearbyDistanceMeter<O,D>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
getNearbyDistance(O origin, D destination)
Measures the distance from the origin to the destination.
-
-
-
Method Detail
-
getNearbyDistance
double getNearbyDistance(O origin, D destination)
Measures the distance from the origin to the destination. The distance can be in any unit, such a meters, foot, seconds or milliseconds. For example, vehicle routing often uses driving time in seconds.Distances can be asymmetrical: the distance from an origin to a destination often differs from the distance from that destination to that origin.
- Parameters:
origin
- never nulldestination
- never null- Returns:
- Preferably always
>= 0.0
. If origin == destination, it usually returns 0.0.
-
-