public class LMAlgoFactoryDecorator extends Object implements RoutingAlgorithmFactoryDecorator
| Modifier and Type | Class and Description |
|---|---|
static class |
LMAlgoFactoryDecorator.LMRAFactory
TODO needs to be public to pick defaultAlgoFactory.weighting if the defaultAlgoFactory is a CH one.
|
| Constructor and Description |
|---|
LMAlgoFactoryDecorator() |
| Modifier and Type | Method and Description |
|---|---|
LMAlgoFactoryDecorator |
addPreparation(PrepareLandmarks pch) |
LMAlgoFactoryDecorator |
addWeighting(String weighting) |
LMAlgoFactoryDecorator |
addWeighting(Weighting weighting)
Decouple weightings from PrepareLandmarks as we need weightings for the graphstorage and the
graphstorage for the preparation.
|
void |
createPreparations(GraphHopperStorage ghStorage,
LocationIndex locationIndex)
This method creates the landmark storages ready for landmark creation.
|
RoutingAlgorithmFactory |
getDecoratedAlgorithmFactory(RoutingAlgorithmFactory defaultAlgoFactory,
HintsMap map)
This method returns the specified algoFactory unchanged, decorates it or completely replaces
it depending on the specified optionsMap.
|
int |
getLandmarks() |
List<PrepareLandmarks> |
getPreparations() |
int |
getPreparationThreads() |
List<Weighting> |
getWeightings() |
List<String> |
getWeightingsAsStrings() |
boolean |
hasPreparations() |
boolean |
hasWeightings() |
void |
init(CmdArgs args) |
boolean |
isDisablingAllowed() |
boolean |
isEnabled() |
boolean |
loadOrDoWork(StorableProperties properties)
This method calculates the landmark data for all weightings (optionally in parallel) or if already existent loads it.
|
LMAlgoFactoryDecorator |
setDisablingAllowed(boolean disablingAllowed) |
LMAlgoFactoryDecorator |
setEnabled(boolean enabled)
Enables or disables this decorator.
|
void |
setPreparationThreads(int preparationThreads)
This method changes the number of threads used for preparation on import.
|
LMAlgoFactoryDecorator |
setWeightingsAsStrings(List<String> weightingList)
Enables the use of contraction hierarchies to reduce query times.
|
int |
size() |
public void init(CmdArgs args)
init in interface RoutingAlgorithmFactoryDecoratorpublic int getLandmarks()
public LMAlgoFactoryDecorator setDisablingAllowed(boolean disablingAllowed)
public final boolean isDisablingAllowed()
public final LMAlgoFactoryDecorator setEnabled(boolean enabled)
public final boolean isEnabled()
isEnabled in interface RoutingAlgorithmFactoryDecoratorpublic int getPreparationThreads()
public void setPreparationThreads(int preparationThreads)
public LMAlgoFactoryDecorator setWeightingsAsStrings(List<String> weightingList)
weightingList - A list containing multiple weightings like: "fastest", "shortest" or
your own weight-calculation type.public LMAlgoFactoryDecorator addWeighting(String weighting)
public LMAlgoFactoryDecorator addWeighting(Weighting weighting)
public LMAlgoFactoryDecorator addPreparation(PrepareLandmarks pch)
public boolean hasWeightings()
public boolean hasPreparations()
public int size()
public List<PrepareLandmarks> getPreparations()
public RoutingAlgorithmFactory getDecoratedAlgorithmFactory(RoutingAlgorithmFactory defaultAlgoFactory, HintsMap map)
RoutingAlgorithmFactoryDecoratorgetDecoratedAlgorithmFactory in interface RoutingAlgorithmFactoryDecoratorpublic boolean loadOrDoWork(StorableProperties properties)
for a very similar methodpublic void createPreparations(GraphHopperStorage ghStorage, LocationIndex locationIndex)
Copyright © 2012–2018. All rights reserved.