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:
parent
06950efc7d
commit
31d9c4b069
1 changed files with 9 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue