@@ -35,18 +35,18 @@ public CHRoutingAlgorithmFactory(CHGraph chGraph) {
35
35
this .chConfig = chGraph .getCHConfig ();
36
36
}
37
37
38
- public RoutingAlgorithm createAlgo (Graph graph , PMap opts ) {
38
+ public BidirRoutingAlgorithm createAlgo (Graph graph , PMap opts ) {
39
39
// todo: This method does not really fit for CH: We get a graph, but really we already know which
40
40
// graph we have to use: the CH graph. Same with opts.weighting: The CHConfig already contains a weighting
41
41
// and we cannot really use it here. The real reason we do this the way its done atm is that graph might be
42
42
// a QueryGraph that wraps (our) CHGraph.
43
- RoutingAlgorithm algo = doCreateAlgo (graph , opts );
43
+ BidirRoutingAlgorithm algo = doCreateAlgo (graph , opts );
44
44
if (opts .has (MAX_VISITED_NODES ))
45
45
algo .setMaxVisitedNodes (opts .getInt (MAX_VISITED_NODES , Integer .MAX_VALUE ));
46
46
return algo ;
47
47
}
48
48
49
- private RoutingAlgorithm doCreateAlgo (Graph graph , PMap opts ) {
49
+ private BidirRoutingAlgorithm doCreateAlgo (Graph graph , PMap opts ) {
50
50
if (chConfig .isEdgeBased ()) {
51
51
// important: do not simply take the turn cost storage from ghStorage, because we need the wrapped storage from
52
52
// query graph!
@@ -62,7 +62,7 @@ private RoutingAlgorithm doCreateAlgo(Graph graph, PMap opts) {
62
62
}
63
63
}
64
64
65
- private RoutingAlgorithm createAlgoEdgeBased (RoutingCHGraph g , PMap opts ) {
65
+ private BidirRoutingAlgorithm createAlgoEdgeBased (RoutingCHGraph g , PMap opts ) {
66
66
// todo: AStar is much faster for edge-based but currently we cannot make it the default because
67
67
// of #2061
68
68
String defaultAlgo = DIJKSTRA_BI ;
@@ -81,7 +81,7 @@ private RoutingAlgorithm createAlgoEdgeBased(RoutingCHGraph g, PMap opts) {
81
81
}
82
82
}
83
83
84
- private RoutingAlgorithm createAlgoNodeBased (RoutingCHGraph g , PMap opts ) {
84
+ private BidirRoutingAlgorithm createAlgoNodeBased (RoutingCHGraph g , PMap opts ) {
85
85
// use dijkstra by default for node-based (its faster)
86
86
String defaultAlgo = DIJKSTRA_BI ;
87
87
String algo = opts .getString (ALGORITHM , defaultAlgo );
0 commit comments