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 TypeMethodDescriptiondoubleapproximate(int fromNode) doublegetSlack()reverse()Makes a 'reverse' copy of itself to make it possible using the two objects independent e.g.setDistanceCalc(DistanceCalc distanceCalc) setEpsilon(double epsilon) voidsetTo(int toNode) toString()
-
Constructor Details
-
BeelineWeightApproximator
-
-
Method Details
-
setTo
public void setTo(int toNode) - Specified by:
setToin interfaceWeightApproximator
-
setEpsilon
-
reverse
Description copied from interface:WeightApproximatorMakes 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:
reversein interfaceWeightApproximator
-
getSlack
public double getSlack()- Specified by:
getSlackin interfaceWeightApproximator
-
approximate
public double approximate(int fromNode) - Specified by:
approximatein interfaceWeightApproximator- Returns:
- minimal weight of the specified currentNode to the 'to' node
-
setDistanceCalc
-
toString
-