/** * Enables the use of contraction hierarchies to reduce query times. Enabled by default. * * @param weightingList A list containing multiple weightings like: "fastest", "shortest" or * your own weight-calculation type. */ public CHAlgoFactoryDecorator setWeightingsAsStrings(List<String> weightingList) { if (weightingList.isEmpty()) throw new IllegalArgumentException("It is not allowed to pass an emtpy weightingList"); weightingsAsStrings.clear(); for (String strWeighting : weightingList) { strWeighting = toLowerCase(strWeighting); strWeighting = strWeighting.trim(); addWeighting(strWeighting); } return this; }
private void initCHAlgoFactoryDecorator() { if (!chFactoryDecorator.hasWeightings()) { for (FlagEncoder encoder : encodingManager.fetchEdgeEncoders()) { for (String chWeightingStr : chFactoryDecorator.getWeightingsAsStrings()) { // ghStorage is null at this point Weighting weighting = createWeighting(new HintsMap(chWeightingStr), encoder, null); chFactoryDecorator.addWeighting(weighting); } } } }
/** * Enables the use of contraction hierarchies to reduce query times. Enabled by default. * * @param weightingList A list containing multiple weightings like: "fastest", "shortest" or * your own weight-calculation type. */ public CHAlgoFactoryDecorator setWeightingsAsStrings( List<String> weightingList ) { if (weightingList.isEmpty()) throw new IllegalArgumentException("It is not allowed to pass an emtpy weightingList"); weightingsAsStrings.clear(); for (String strWeighting : weightingList) { strWeighting = strWeighting.toLowerCase(); strWeighting = strWeighting.trim(); addWeighting(strWeighting); } return this; }
/** * Enables the use of contraction hierarchies to reduce query times. Enabled by default. * * @param weightingList A list containing multiple weightings like: "fastest", "shortest" or * your own weight-calculation type. */ public CHAlgoFactoryDecorator setWeightingsAsStrings(List<String> weightingList) { if (weightingList.isEmpty()) throw new IllegalArgumentException("It is not allowed to pass an emtpy weightingList"); weightingsAsStrings.clear(); for (String strWeighting : weightingList) { strWeighting = strWeighting.toLowerCase(); strWeighting = strWeighting.trim(); addWeighting(strWeighting); } return this; }
/** * Enables the use of contraction hierarchies to reduce query times. Enabled by default. * * @param weightingList A list containing multiple weightings like: "fastest", "shortest" or * your own weight-calculation type. */ public CHAlgoFactoryDecorator setWeightingsAsStrings(List<String> weightingList) { if (weightingList.isEmpty()) throw new IllegalArgumentException("It is not allowed to pass an emtpy weightingList"); weightingsAsStrings.clear(); for (String strWeighting : weightingList) { strWeighting = toLowerCase(strWeighting); strWeighting = strWeighting.trim(); addWeighting(strWeighting); } return this; }
private void initCHAlgoFactoryDecorator() { if (!chFactoryDecorator.hasWeightings()) { for (FlagEncoder encoder : encodingManager.fetchEdgeEncoders()) { for (String chWeightingStr : chFactoryDecorator.getWeightingsAsStrings()) { Weighting weighting = createWeighting(new HintsMap(chWeightingStr), encoder, null); chFactoryDecorator.addWeighting(weighting); } } } }
private void initCHAlgoFactoryDecorator() { if (!chFactoryDecorator.hasWeightings()) { for (FlagEncoder encoder : encodingManager.fetchEdgeEncoders()) { for (String chWeightingStr : chFactoryDecorator.getWeightingsAsStrings()) { // ghStorage is null at this point Weighting weighting = createWeighting(new HintsMap(chWeightingStr), encoder, null); chFactoryDecorator.addWeighting(weighting); } } } }
private void initCHAlgoFactoryDecorator() { if (!chFactoryDecorator.hasWeightings()) for (FlagEncoder encoder : encodingManager.fetchEdgeEncoders()) { for (String chWeightingStr : chFactoryDecorator.getWeightingsAsStrings()) { Weighting weighting = createWeighting(new HintsMap(chWeightingStr), encoder); chFactoryDecorator.addWeighting(weighting); } } }