Class DistanceMapImpl
- java.lang.Object
-
- org.optaweb.vehiclerouting.plugin.planner.DistanceMapImpl
-
- All Implemented Interfaces:
DistanceMap
public class DistanceMapImpl extends Object implements DistanceMap
Provides distances toPlanningLocations by reading from aDistanceMatrixRow.
-
-
Constructor Summary
Constructors Constructor Description DistanceMapImpl(DistanceMatrixRow distanceMatrixRow)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longdistanceTo(PlanningLocation location)Get distance from a reference location to the given location.
-
-
-
Constructor Detail
-
DistanceMapImpl
public DistanceMapImpl(DistanceMatrixRow distanceMatrixRow)
-
-
Method Detail
-
distanceTo
public long distanceTo(PlanningLocation location)
Description copied from interface:DistanceMapGet distance from a reference location to the given location. The actual physical quantity (distance or time) and its units depend on the configuration of the routing engine and is not important for optimization.- Specified by:
distanceToin interfaceDistanceMap- Parameters:
location- location the distance of which will be returned- Returns:
- location's distance
-
-