Run clang-format
This commit is contained in:
@@ -564,7 +564,8 @@ class AlternativeRouting final
|
||||
const NodeID node = forward_heap.DeleteMin();
|
||||
const int distance = forward_heap.GetKey(node);
|
||||
// const NodeID parentnode = forward_heap.GetData(node).parent;
|
||||
// util::SimpleLogger().Write() << (is_forward_directed ? "[fwd] " : "[rev] ") << "settled edge ("
|
||||
// util::SimpleLogger().Write() << (is_forward_directed ? "[fwd] " : "[rev] ") << "settled
|
||||
// edge ("
|
||||
// << parentnode << "," << node << "), dist: " << distance;
|
||||
|
||||
const int scaled_distance =
|
||||
@@ -588,10 +589,12 @@ class AlternativeRouting final
|
||||
{
|
||||
*middle_node = node;
|
||||
*upper_bound_to_shortest_path_distance = new_distance;
|
||||
// util::SimpleLogger().Write() << "accepted middle_node " << *middle_node << " at
|
||||
// util::SimpleLogger().Write() << "accepted middle_node " << *middle_node
|
||||
// << " at
|
||||
// distance " << new_distance;
|
||||
// } else {
|
||||
// util::SimpleLogger().Write() << "discarded middle_node " << *middle_node << "
|
||||
// util::SimpleLogger().Write() << "discarded middle_node " << *middle_node
|
||||
// << "
|
||||
// at distance " << new_distance;
|
||||
}
|
||||
}
|
||||
@@ -846,7 +849,6 @@ class AlternativeRouting final
|
||||
return (upper_bound <= t_test_path_length);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +131,6 @@ class DirectShortestPathRouting final
|
||||
raw_route_data.unpacked_path_segments.front());
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,8 +147,8 @@ class MapMatching final : public BasicRoutingInterface<DataFacadeT, MapMatching<
|
||||
}
|
||||
else
|
||||
{
|
||||
trace_split = trace_split || (t - prev_unbroken_timestamps.back() >
|
||||
MAX_BROKEN_STATES);
|
||||
trace_split =
|
||||
trace_split || (t - prev_unbroken_timestamps.back() > MAX_BROKEN_STATES);
|
||||
}
|
||||
|
||||
if (trace_split)
|
||||
@@ -194,8 +194,8 @@ class MapMatching final : public BasicRoutingInterface<DataFacadeT, MapMatching<
|
||||
const auto ¤t_timestamps_list = candidates_list[t];
|
||||
const auto ¤t_coordinate = trace_coordinates[t];
|
||||
|
||||
const auto haversine_distance =
|
||||
util::coordinate_calculation::haversineDistance(prev_coordinate, current_coordinate);
|
||||
const auto haversine_distance = util::coordinate_calculation::haversineDistance(
|
||||
prev_coordinate, current_coordinate);
|
||||
|
||||
// compute d_t for this timestamp and the next one
|
||||
for (const auto s : util::irange<std::size_t>(0u, prev_viterbi.size()))
|
||||
@@ -246,8 +246,7 @@ class MapMatching final : public BasicRoutingInterface<DataFacadeT, MapMatching<
|
||||
current_parents[s_prime] = std::make_pair(prev_unbroken_timestamp, s);
|
||||
current_lengths[s_prime] = network_distance;
|
||||
current_pruned[s_prime] = false;
|
||||
current_suspicious[s_prime] =
|
||||
d_t > SUSPICIOUS_DISTANCE_DELTA;
|
||||
current_suspicious[s_prime] = d_t > SUSPICIOUS_DISTANCE_DELTA;
|
||||
model.breakage[t] = false;
|
||||
}
|
||||
}
|
||||
@@ -355,7 +354,6 @@ class MapMatching final : public BasicRoutingInterface<DataFacadeT, MapMatching<
|
||||
matching_debug.add_breakage(model.breakage);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ SearchEngineData::SearchEngineHeapPtr SearchEngineData::reverse_heap_3;
|
||||
namespace routing_algorithms
|
||||
{
|
||||
|
||||
|
||||
template <class DataFacadeT, class Derived> class BasicRoutingInterface
|
||||
{
|
||||
private:
|
||||
@@ -231,7 +230,8 @@ template <class DataFacadeT, class Derived> class BasicRoutingInterface
|
||||
{
|
||||
BOOST_ASSERT_MSG(!ed.shortcut, "original edge flagged as shortcut");
|
||||
unsigned name_index = facade->GetNameIndexFromEdgeID(ed.id);
|
||||
const extractor::TurnInstruction turn_instruction = facade->GetTurnInstructionForEdgeID(ed.id);
|
||||
const extractor::TurnInstruction turn_instruction =
|
||||
facade->GetTurnInstructionForEdgeID(ed.id);
|
||||
const extractor::TravelMode travel_mode = facade->GetTravelModeForEdgeID(ed.id);
|
||||
|
||||
if (!facade->EdgeIsCompressed(ed.id))
|
||||
@@ -260,7 +260,8 @@ template <class DataFacadeT, class Derived> class BasicRoutingInterface
|
||||
for (std::size_t i = start_index; i < end_index; ++i)
|
||||
{
|
||||
unpacked_path.emplace_back(id_vector[i], name_index,
|
||||
extractor::TurnInstruction::NoTurn, 0, travel_mode);
|
||||
extractor::TurnInstruction::NoTurn, 0,
|
||||
travel_mode);
|
||||
}
|
||||
unpacked_path.back().turn_instruction = turn_instruction;
|
||||
unpacked_path.back().segment_duration = ed.distance;
|
||||
@@ -304,9 +305,10 @@ template <class DataFacadeT, class Derived> class BasicRoutingInterface
|
||||
{
|
||||
BOOST_ASSERT(i < id_vector.size());
|
||||
BOOST_ASSERT(phantom_node_pair.target_phantom.forward_travel_mode > 0);
|
||||
unpacked_path.emplace_back(PathData{
|
||||
id_vector[i], phantom_node_pair.target_phantom.name_id, extractor::TurnInstruction::NoTurn,
|
||||
0, phantom_node_pair.target_phantom.forward_travel_mode});
|
||||
unpacked_path.emplace_back(
|
||||
PathData{id_vector[i], phantom_node_pair.target_phantom.name_id,
|
||||
extractor::TurnInstruction::NoTurn, 0,
|
||||
phantom_node_pair.target_phantom.forward_travel_mode});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -658,16 +660,15 @@ template <class DataFacadeT, class Derived> class BasicRoutingInterface
|
||||
{
|
||||
current_coordinate = facade->GetCoordinateOfNode(p.node);
|
||||
distance += util::coordinate_calculation::haversineDistance(previous_coordinate,
|
||||
current_coordinate);
|
||||
current_coordinate);
|
||||
previous_coordinate = current_coordinate;
|
||||
}
|
||||
distance += util::coordinate_calculation::haversineDistance(previous_coordinate,
|
||||
target_phantom.location);
|
||||
target_phantom.location);
|
||||
}
|
||||
return distance;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -521,7 +521,6 @@ class ShortestPathRouting final
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user