1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

changed visibility of .getDistance() in

core.util.VehicleRoutingTransportCostsMatrix from private to public
according to issue #83
This commit is contained in:
oblonski 2014-03-21 20:50:38 +01:00
parent 06950efc7d
commit 31d9c4b069

View file

@ -220,7 +220,15 @@ public class VehicleRoutingTransportCostsMatrix extends AbstractForwardVehicleRo
}
}
private double getDistance(String fromId, String toId) {
/**
* Returns the distance fromId to toId.
*
* @param fromId
* @param toId
* @return
* @throws IllegalStateException if distance of fromId -> toId is not found
*/
public double getDistance(String fromId, String toId) {
if(fromId.equals(toId)) return 0.0;
if(!distancesSet) return 0.0;
RelationKey key = RelationKey.newKey(fromId, toId);