public class CHAlgoFactoryDecorator extends Object implements RoutingAlgorithmFactoryDecorator
| Constructor and Description |
|---|
CHAlgoFactoryDecorator() |
| Modifier and Type | Method and Description |
|---|---|
CHAlgoFactoryDecorator |
addPreparation(PrepareContractionHierarchies pch) |
CHAlgoFactoryDecorator |
addWeighting(String weighting) |
CHAlgoFactoryDecorator |
addWeighting(Weighting weighting)
Decouple weightings from PrepareContractionHierarchies as we need weightings for the
graphstorage and the graphstorage for the preparation.
|
void |
createPreparations(GraphHopperStorage ghStorage,
TraversalMode traversalMode) |
RoutingAlgorithmFactory |
getDecoratedAlgorithmFactory(RoutingAlgorithmFactory defaultAlgoFactory,
HintsMap map)
This method returns the specified algoFactory unchanged, decorates it or completely replaces
it depending on the specified optionsMap.
|
TraversalMode |
getNodeBase()
For now only node based will work, later on we can easily find usage of this method to remove
it.
|
int |
getPreparationContractedNodes() |
int |
getPreparationLazyUpdates() |
double |
getPreparationLogMessages() |
int |
getPreparationNeighborUpdates() |
int |
getPreparationPeriodicUpdates() |
List<PrepareContractionHierarchies> |
getPreparations() |
int |
getPreparationThreads() |
List<Weighting> |
getWeightings() |
List<String> |
getWeightingsAsStrings() |
boolean |
hasWeightings() |
void |
init(CmdArgs args) |
boolean |
isDisablingAllowed() |
boolean |
isEnabled() |
void |
prepare(StorableProperties properties) |
CHAlgoFactoryDecorator |
setDisablingAllowed(boolean disablingAllowed)
This method specifies if it is allowed to disable CH routing at runtime via routing hints.
|
CHAlgoFactoryDecorator |
setEnabled(boolean enabled)
Enables or disables contraction hierarchies (CH).
|
CHAlgoFactoryDecorator |
setPreparationContractedNodes(int prepareContractedNodes) |
CHAlgoFactoryDecorator |
setPreparationLazyUpdates(int prepareLazyUpdates) |
CHAlgoFactoryDecorator |
setPreparationLogMessages(double prepareLogMessages) |
CHAlgoFactoryDecorator |
setPreparationNeighborUpdates(int prepareNeighborUpdates) |
CHAlgoFactoryDecorator |
setPreparationPeriodicUpdates(int preparePeriodicUpdates) |
void |
setPreparationThreads(int preparationThreads)
This method changes the number of threads used for preparation on import.
|
CHAlgoFactoryDecorator |
setWeightingsAsStrings(List<String> weightingList)
Enables the use of contraction hierarchies to reduce query times.
|
CHAlgoFactoryDecorator |
setWeightingsAsStrings(String... weightingNames) |
public void init(CmdArgs args)
init in interface RoutingAlgorithmFactoryDecoratorpublic int getPreparationPeriodicUpdates()
public CHAlgoFactoryDecorator setPreparationPeriodicUpdates(int preparePeriodicUpdates)
public int getPreparationContractedNodes()
public CHAlgoFactoryDecorator setPreparationContractedNodes(int prepareContractedNodes)
public int getPreparationLazyUpdates()
public CHAlgoFactoryDecorator setPreparationLazyUpdates(int prepareLazyUpdates)
public double getPreparationLogMessages()
public CHAlgoFactoryDecorator setPreparationLogMessages(double prepareLogMessages)
public int getPreparationNeighborUpdates()
public CHAlgoFactoryDecorator setPreparationNeighborUpdates(int prepareNeighborUpdates)
public final boolean isEnabled()
isEnabled in interface RoutingAlgorithmFactoryDecoratorpublic final CHAlgoFactoryDecorator setEnabled(boolean enabled)
public final boolean isDisablingAllowed()
public final CHAlgoFactoryDecorator setDisablingAllowed(boolean disablingAllowed)
public CHAlgoFactoryDecorator addWeighting(Weighting weighting)
public CHAlgoFactoryDecorator addWeighting(String weighting)
public CHAlgoFactoryDecorator addPreparation(PrepareContractionHierarchies pch)
public final boolean hasWeightings()
public CHAlgoFactoryDecorator setWeightingsAsStrings(String... weightingNames)
public CHAlgoFactoryDecorator setWeightingsAsStrings(List<String> weightingList)
weightingList - A list containing multiple weightings like: "fastest", "shortest" or
your own weight-calculation type.public List<PrepareContractionHierarchies> getPreparations()
public RoutingAlgorithmFactory getDecoratedAlgorithmFactory(RoutingAlgorithmFactory defaultAlgoFactory, HintsMap map)
RoutingAlgorithmFactoryDecoratorgetDecoratedAlgorithmFactory in interface RoutingAlgorithmFactoryDecoratorpublic int getPreparationThreads()
public void setPreparationThreads(int preparationThreads)
public void prepare(StorableProperties properties)
public void createPreparations(GraphHopperStorage ghStorage, TraversalMode traversalMode)
public TraversalMode getNodeBase()
Copyright © 2012–2018. All rights reserved.