@@ -45,10 +45,11 @@ inline bool addLoopWeight(const DataFacade<ch::Algorithm> &facade,
4545}
4646
4747template <bool DIRECTION>
48- void relaxOutgoingEdges (const DataFacade<Algorithm> &facade,
49- const typename SearchEngineData<Algorithm>::ManyToManyQueryHeap::HeapNode& heapNode,
50- typename SearchEngineData<Algorithm>::ManyToManyQueryHeap &query_heap,
51- const PhantomNode &)
48+ void relaxOutgoingEdges (
49+ const DataFacade<Algorithm> &facade,
50+ const typename SearchEngineData<Algorithm>::ManyToManyQueryHeap::HeapNode &heapNode,
51+ typename SearchEngineData<Algorithm>::ManyToManyQueryHeap &query_heap,
52+ const PhantomNode &)
5253{
5354 if (stallAtNode<DIRECTION>(facade, heapNode, query_heap))
5455 {
@@ -71,7 +72,7 @@ void relaxOutgoingEdges(const DataFacade<Algorithm> &facade,
7172 const auto to_duration = heapNode.data .duration + edge_duration;
7273 const auto to_distance = heapNode.data .distance + edge_distance;
7374
74- const auto toHeapNode= query_heap.GetHeapNodeIfWasInserted (to);
75+ const auto toHeapNode = query_heap.GetHeapNodeIfWasInserted (to);
7576 // New Node discovered -> Add to Heap + Node Info Storage
7677 if (!toHeapNode)
7778 {
@@ -82,7 +83,7 @@ void relaxOutgoingEdges(const DataFacade<Algorithm> &facade,
8283 std::tie (toHeapNode->weight , toHeapNode->data .duration ))
8384 {
8485 toHeapNode->data = {heapNode.node , to_duration, to_distance};
85- toHeapNode->weight = to_weight;
86+ toHeapNode->weight = to_weight;
8687 query_heap.DecreaseKey (*toHeapNode);
8788 }
8889 }
@@ -100,8 +101,9 @@ void forwardRoutingStep(const DataFacade<Algorithm> &facade,
100101 std::vector<NodeID> &middle_nodes_table,
101102 const PhantomNode &phantom_node)
102103{
103- // Take a copy of the extracted node because otherwise could be modified later if toHeapNode is the same
104- const auto heapNode=query_heap.DeleteMinGetHeapNode ();
104+ // Take a copy of the extracted node because otherwise could be modified later if toHeapNode is
105+ // the same
106+ const auto heapNode = query_heap.DeleteMinGetHeapNode ();
105107
106108 // Check if each encountered node has an entry
107109 const auto &bucket_list = std::equal_range (search_space_with_buckets.begin (),
@@ -149,8 +151,7 @@ void forwardRoutingStep(const DataFacade<Algorithm> &facade,
149151 }
150152 }
151153
152- relaxOutgoingEdges<FORWARD_DIRECTION>(
153- facade, heapNode, query_heap, phantom_node);
154+ relaxOutgoingEdges<FORWARD_DIRECTION>(facade, heapNode, query_heap, phantom_node);
154155}
155156
156157void backwardRoutingStep (const DataFacade<Algorithm> &facade,
@@ -159,15 +160,19 @@ void backwardRoutingStep(const DataFacade<Algorithm> &facade,
159160 std::vector<NodeBucket> &search_space_with_buckets,
160161 const PhantomNode &phantom_node)
161162{
162- // Take a copy (no ref &) of the extracted node because otherwise could be modified later if toHeapNode is the same
163- const auto heapNode=query_heap.DeleteMinGetHeapNode ();
163+ // Take a copy (no ref &) of the extracted node because otherwise could be modified later if
164+ // toHeapNode is the same
165+ const auto heapNode = query_heap.DeleteMinGetHeapNode ();
164166
165167 // Store settled nodes in search space bucket
166- search_space_with_buckets.emplace_back (
167- heapNode.node , heapNode.data .parent , column_index, heapNode.weight , heapNode.data .duration , heapNode.data .distance );
168-
169- relaxOutgoingEdges<REVERSE_DIRECTION>(
170- facade, heapNode, query_heap, phantom_node);
168+ search_space_with_buckets.emplace_back (heapNode.node ,
169+ heapNode.data .parent ,
170+ column_index,
171+ heapNode.weight ,
172+ heapNode.data .duration ,
173+ heapNode.data .distance );
174+
175+ relaxOutgoingEdges<REVERSE_DIRECTION>(facade, heapNode, query_heap, phantom_node);
171176}
172177
173178} // namespace ch
0 commit comments