remove templates from routing algorithms
This commit is contained in:
committed by
Patrick Niklaus
parent
f2c3b9859e
commit
d129b0ef24
@@ -180,7 +180,7 @@ Status MatchPlugin::HandleRequest(const std::shared_ptr<const datafacade::BaseDa
|
||||
}
|
||||
|
||||
// call the actual map matching
|
||||
SubMatchingList sub_matchings = map_matching(*facade,
|
||||
SubMatchingList sub_matchings = map_matching(facade,
|
||||
candidates_lists,
|
||||
parameters.coordinates,
|
||||
parameters.timestamps,
|
||||
@@ -211,7 +211,7 @@ Status MatchPlugin::HandleRequest(const std::shared_ptr<const datafacade::BaseDa
|
||||
// bi-directional
|
||||
// phantom nodes for possible uturns
|
||||
shortest_path(
|
||||
*facade, sub_routes[index].segment_end_coordinates, {false}, sub_routes[index]);
|
||||
facade, sub_routes[index].segment_end_coordinates, {false}, sub_routes[index]);
|
||||
BOOST_ASSERT(sub_routes[index].shortest_path_length != INVALID_EDGE_WEIGHT);
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ Status TablePlugin::HandleRequest(const std::shared_ptr<const datafacade::BaseDa
|
||||
|
||||
auto snapped_phantoms = SnapPhantomNodes(GetPhantomNodes(*facade, params));
|
||||
auto result_table =
|
||||
distance_table(*facade, snapped_phantoms, params.sources, params.destinations);
|
||||
distance_table(facade, snapped_phantoms, params.sources, params.destinations);
|
||||
|
||||
if (result_table.empty())
|
||||
{
|
||||
|
||||
@@ -114,9 +114,10 @@ SCC_Component SplitUnaccessibleLocations(const std::size_t number_of_locations,
|
||||
return SCC_Component(std::move(components), std::move(range));
|
||||
}
|
||||
|
||||
InternalRouteResult TripPlugin::ComputeRoute(const datafacade::BaseDataFacade &facade,
|
||||
const std::vector<PhantomNode> &snapped_phantoms,
|
||||
const std::vector<NodeID> &trip) const
|
||||
InternalRouteResult
|
||||
TripPlugin::ComputeRoute(const std::shared_ptr<const datafacade::BaseDataFacade> facade,
|
||||
const std::vector<PhantomNode> &snapped_phantoms,
|
||||
const std::vector<NodeID> &trip) const
|
||||
{
|
||||
InternalRouteResult min_route;
|
||||
// given he final trip, compute total duration and return the route and location permutation
|
||||
@@ -175,7 +176,7 @@ Status TripPlugin::HandleRequest(const std::shared_ptr<const datafacade::BaseDat
|
||||
|
||||
// compute the duration table of all phantom nodes
|
||||
const auto result_table = util::DistTableWrapper<EdgeWeight>(
|
||||
duration_table(*facade, snapped_phantoms, {}, {}), number_of_locations);
|
||||
duration_table(facade, snapped_phantoms, {}, {}), number_of_locations);
|
||||
|
||||
if (result_table.size() == 0)
|
||||
{
|
||||
@@ -233,7 +234,7 @@ Status TripPlugin::HandleRequest(const std::shared_ptr<const datafacade::BaseDat
|
||||
routes.reserve(trips.size());
|
||||
for (const auto &trip : trips)
|
||||
{
|
||||
routes.push_back(ComputeRoute(*facade, snapped_phantoms, trip));
|
||||
routes.push_back(ComputeRoute(facade, snapped_phantoms, trip));
|
||||
}
|
||||
|
||||
api::TripAPI trip_api{*facade, parameters};
|
||||
|
||||
@@ -88,16 +88,16 @@ Status ViaRoutePlugin::HandleRequest(const std::shared_ptr<const datafacade::Bas
|
||||
{
|
||||
if (route_parameters.alternatives && facade->GetCoreSize() == 0)
|
||||
{
|
||||
alternative_path(*facade, raw_route.segment_end_coordinates.front(), raw_route);
|
||||
alternative_path(facade, raw_route.segment_end_coordinates.front(), raw_route);
|
||||
}
|
||||
else
|
||||
{
|
||||
direct_shortest_path(*facade, raw_route.segment_end_coordinates, raw_route);
|
||||
direct_shortest_path(facade, raw_route.segment_end_coordinates, raw_route);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
shortest_path(*facade,
|
||||
shortest_path(facade,
|
||||
raw_route.segment_end_coordinates,
|
||||
route_parameters.continue_straight,
|
||||
raw_route);
|
||||
|
||||
Reference in New Issue
Block a user