public class CHAlgoFactoryDecorator extends Object implements RoutingAlgorithmFactoryDecorator
| Modifier and Type | Class and Description |
|---|---|
static class |
CHAlgoFactoryDecorator.EdgeBasedCHMode
Determines whether or not edge-based CH will be prepared for the different weightings/encoders.
|
| Constructor and Description |
|---|
CHAlgoFactoryDecorator() |
| Modifier and Type | Method and Description |
|---|---|
CHAlgoFactoryDecorator |
addEdgeBasedWeighting(Weighting weighting) |
CHAlgoFactoryDecorator |
addNodeBasedWeighting(Weighting weighting)
Decouple weightings from PrepareContractionHierarchies as we need weightings for the
graphstorage and the graphstorage for the preparation.
|
CHAlgoFactoryDecorator |
addPreparation(PrepareContractionHierarchies pch) |
CHAlgoFactoryDecorator |
addWeighting(String weighting) |
void |
createPreparations(GraphHopperStorage ghStorage) |
RoutingAlgorithmFactory |
getDecoratedAlgorithmFactory(RoutingAlgorithmFactory defaultAlgoFactory,
HintsMap map)
This method returns the specified algoFactory unchanged, decorates it or completely replaces
it depending on the specified optionsMap.
|
CHAlgoFactoryDecorator.EdgeBasedCHMode |
getEdgeBasedCHMode() |
List<Weighting> |
getEdgeBasedWeightings() |
List<Weighting> |
getNodeBasedWeightings() |
PrepareContractionHierarchies |
getPreparation(HintsMap map) |
List<PrepareContractionHierarchies> |
getPreparations() |
int |
getPreparationThreads() |
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 |
setEdgeBasedCHMode(CHAlgoFactoryDecorator.EdgeBasedCHMode edgeBasedCHMode)
This method specifies whether or not edge-based CH preparation (needed for turn costs) should be performed.
|
CHAlgoFactoryDecorator |
setEnabled(boolean enabled)
Enables or disables contraction hierarchies (CH).
|
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 final boolean isEnabled()
isEnabled in interface RoutingAlgorithmFactoryDecoratorpublic final CHAlgoFactoryDecorator setEnabled(boolean enabled)
public final boolean isDisablingAllowed()
public final CHAlgoFactoryDecorator setDisablingAllowed(boolean disablingAllowed)
public final CHAlgoFactoryDecorator setEdgeBasedCHMode(CHAlgoFactoryDecorator.EdgeBasedCHMode edgeBasedCHMode)
CHAlgoFactoryDecorator.EdgeBasedCHModepublic CHAlgoFactoryDecorator addNodeBasedWeighting(Weighting weighting)
public CHAlgoFactoryDecorator addEdgeBasedWeighting(Weighting weighting)
public CHAlgoFactoryDecorator addWeighting(String weighting)
public CHAlgoFactoryDecorator addPreparation(PrepareContractionHierarchies pch)
public final boolean hasWeightings()
public CHAlgoFactoryDecorator.EdgeBasedCHMode getEdgeBasedCHMode()
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 PrepareContractionHierarchies getPreparation(HintsMap map)
public int getPreparationThreads()
public void setPreparationThreads(int preparationThreads)
public void prepare(StorableProperties properties)
public void createPreparations(GraphHopperStorage ghStorage)
Copyright © 2012–2019. All rights reserved.