Class BeelineWeightApproximator
java.lang.Object
com.graphhopper.routing.weighting.BeelineWeightApproximator
- All Implemented Interfaces:
WeightApproximator
Approximates the distance to the goal node by weighting the beeline distance according to the
distance weighting
- Author:
- jansoe
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
approximate
(int fromNode) double
getSlack()
reverse()
Makes a 'reverse' copy of itself to make it possible using the two objects independent e.g.setDistanceCalc
(DistanceCalc distanceCalc) setEpsilon
(double epsilon) void
setTo
(int toNode) toString()
-
Constructor Details
-
BeelineWeightApproximator
-
-
Method Details
-
setTo
public void setTo(int toNode) - Specified by:
setTo
in interfaceWeightApproximator
-
setEpsilon
-
reverse
Description copied from interface:WeightApproximator
Makes a 'reverse' copy of itself to make it possible using the two objects independent e.g. on different threads. Do not copy state depending on the current approximate calls. 'reverse' means the WeightApproximator should handle approximate calls towards the 'from' instead towards the 'to'.- Specified by:
reverse
in interfaceWeightApproximator
-
getSlack
public double getSlack()- Specified by:
getSlack
in interfaceWeightApproximator
-
approximate
public double approximate(int fromNode) - Specified by:
approximate
in interfaceWeightApproximator
- Returns:
- minimal weight of the specified currentNode to the 'to' node
-
setDistanceCalc
-
toString
-