Refactor routing_algorithms to only contain free functions
This commit is contained in:
committed by
Patrick Niklaus
parent
2fa8d0f534
commit
436b34ffea
@@ -208,8 +208,8 @@ Status MatchPlugin::HandleRequest(const datafacade::ContiguousInternalMemoryData
|
||||
// force uturns to be on, since we split the phantom nodes anyway and only have
|
||||
// bi-directional
|
||||
// phantom nodes for possible uturns
|
||||
algorithms.ShortestRouting(
|
||||
sub_routes[index].segment_end_coordinates, {false}, sub_routes[index]);
|
||||
sub_routes[index] =
|
||||
algorithms.ShortestRouting(sub_routes[index].segment_end_coordinates, {false});
|
||||
BOOST_ASSERT(sub_routes[index].shortest_path_length != INVALID_EDGE_WEIGHT);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "engine/plugins/tile.hpp"
|
||||
#include "engine/edge_unpacker.hpp"
|
||||
#include "engine/plugins/plugin_base.hpp"
|
||||
|
||||
#include "util/coordinate_calculation.hpp"
|
||||
|
||||
@@ -85,7 +85,7 @@ InternalRouteResult TripPlugin::ComputeRoute(const RoutingAlgorithmsInterface &a
|
||||
BOOST_ASSERT(min_route.segment_end_coordinates.size() == trip.size() - 1);
|
||||
}
|
||||
|
||||
algorithms.ShortestRouting(min_route.segment_end_coordinates, {false}, min_route);
|
||||
min_route = algorithms.ShortestRouting(min_route.segment_end_coordinates, {false});
|
||||
BOOST_ASSERT_MSG(min_route.shortest_path_length < INVALID_EDGE_WEIGHT, "unroutable route");
|
||||
return min_route;
|
||||
}
|
||||
|
||||
@@ -89,17 +89,17 @@ ViaRoutePlugin::HandleRequest(const datafacade::ContiguousInternalMemoryDataFaca
|
||||
{
|
||||
if (route_parameters.alternatives && algorithms.HasAlternativeRouting())
|
||||
{
|
||||
algorithms.AlternativeRouting(raw_route.segment_end_coordinates.front(), raw_route);
|
||||
raw_route = algorithms.AlternativeRouting(raw_route.segment_end_coordinates.front());
|
||||
}
|
||||
else
|
||||
{
|
||||
algorithms.DirectShortestPathRouting(raw_route.segment_end_coordinates, raw_route);
|
||||
raw_route = algorithms.DirectShortestPathRouting(raw_route.segment_end_coordinates);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
algorithms.ShortestRouting(
|
||||
raw_route.segment_end_coordinates, route_parameters.continue_straight, raw_route);
|
||||
raw_route = algorithms.ShortestRouting(raw_route.segment_end_coordinates,
|
||||
route_parameters.continue_straight);
|
||||
}
|
||||
|
||||
// we can only know this after the fact, different SCC ids still
|
||||
|
||||
Reference in New Issue
Block a user