Class TourStrategy
java.lang.Object
com.graphhopper.routing.util.tour.TourStrategy
- Direct Known Subclasses:
MultiPointTour
,SinglePointTour
Defines the strategy of creating tours.
- Author:
- Robin Boldt
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract double
getDistanceForIteration
(int iteration) Returns the distance in meter that is used for the generated point of a certain iterationabstract double
getHeadingForIteration
(int iteration) Returns the north based heading between 0 and 360 for a certain iteration.abstract int
Defines the number of points that are generatedprotected double
slightlyModifyDistance
(double distance) Modifies the Distance up to +-10%
-
Field Details
-
random
-
overallDistance
protected final double overallDistance
-
-
Constructor Details
-
TourStrategy
-
-
Method Details
-
getNumberOfGeneratedPoints
public abstract int getNumberOfGeneratedPoints()Defines the number of points that are generated -
getDistanceForIteration
public abstract double getDistanceForIteration(int iteration) Returns the distance in meter that is used for the generated point of a certain iteration -
getHeadingForIteration
public abstract double getHeadingForIteration(int iteration) Returns the north based heading between 0 and 360 for a certain iteration. -
slightlyModifyDistance
protected double slightlyModifyDistance(double distance) Modifies the Distance up to +-10%
-