Skip to content

Commit d5154b4

Browse files
committed
Adds CHAlgoFactoryDecorator#getPreparation.
(cherry picked from commit 741a68d) Signed-off-by: easbar <[email protected]>
1 parent 6b07850 commit d5154b4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/src/main/java/com/graphhopper/routing/ch/CHAlgoFactoryDecorator.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,14 @@ public RoutingAlgorithmFactory getDecoratedAlgorithmFactory(RoutingAlgorithmFact
243243
if (map.getWeighting().isEmpty())
244244
map.setWeighting(getDefaultWeighting());
245245

246+
return getPreparation(map);
247+
}
248+
249+
public PrepareContractionHierarchies getPreparation(HintsMap map) {
246250
boolean edgeBased = map.getBool(Parameters.Routing.EDGE_BASED, false);
247251
List<String> entriesStrs = new ArrayList<>();
248252
boolean weightingMatchesButNotEdgeBased = false;
249-
for (PrepareContractionHierarchies p : allPreparations) {
253+
for (PrepareContractionHierarchies p : getPreparations()) {
250254
boolean weightingMatches = p.getWeighting().matches(map);
251255
if (p.isEdgeBased() == edgeBased && weightingMatches)
252256
return p;

0 commit comments

Comments
 (0)