Added unpacked_nodes vector to annotatePath interface
This commit is contained in:
parent
be1acae20c
commit
40d0297885
@ -93,38 +93,38 @@ void insertNodesInHeaps(Heap &forward_heap, Heap &reverse_heap, const PhantomNod
|
|||||||
|
|
||||||
template <typename FacadeT>
|
template <typename FacadeT>
|
||||||
void annotatePath(const FacadeT &facade,
|
void annotatePath(const FacadeT &facade,
|
||||||
const NodeID source_node,
|
|
||||||
const NodeID target_node,
|
|
||||||
const std::vector<EdgeID> &unpacked_edges,
|
|
||||||
const PhantomNodes &phantom_node_pair,
|
const PhantomNodes &phantom_node_pair,
|
||||||
|
const std::vector<NodeID> &unpacked_nodes,
|
||||||
|
const std::vector<EdgeID> &unpacked_edges,
|
||||||
std::vector<PathData> &unpacked_path)
|
std::vector<PathData> &unpacked_path)
|
||||||
{
|
{
|
||||||
BOOST_ASSERT(source_node != SPECIAL_NODEID && target_node != SPECIAL_NODEID);
|
BOOST_ASSERT(!unpacked_nodes.empty());
|
||||||
BOOST_ASSERT(!unpacked_edges.empty() || source_node == target_node);
|
BOOST_ASSERT(unpacked_nodes.size() == unpacked_edges.size() + 1);
|
||||||
|
|
||||||
const bool start_traversed_in_reverse =
|
const bool start_traversed_in_reverse =
|
||||||
phantom_node_pair.source_phantom.forward_segment_id.id != source_node;
|
phantom_node_pair.source_phantom.forward_segment_id.id != unpacked_nodes.front();
|
||||||
const bool target_traversed_in_reverse =
|
const bool target_traversed_in_reverse =
|
||||||
phantom_node_pair.target_phantom.forward_segment_id.id != target_node;
|
phantom_node_pair.target_phantom.forward_segment_id.id != unpacked_nodes.back();
|
||||||
|
|
||||||
BOOST_ASSERT(phantom_node_pair.source_phantom.forward_segment_id.id == source_node ||
|
BOOST_ASSERT(phantom_node_pair.source_phantom.forward_segment_id.id == unpacked_nodes.front() ||
|
||||||
phantom_node_pair.source_phantom.reverse_segment_id.id == source_node);
|
phantom_node_pair.source_phantom.reverse_segment_id.id == unpacked_nodes.front());
|
||||||
BOOST_ASSERT(phantom_node_pair.target_phantom.forward_segment_id.id == target_node ||
|
BOOST_ASSERT(phantom_node_pair.target_phantom.forward_segment_id.id == unpacked_nodes.back() ||
|
||||||
phantom_node_pair.target_phantom.reverse_segment_id.id == target_node);
|
phantom_node_pair.target_phantom.reverse_segment_id.id == unpacked_nodes.back());
|
||||||
|
|
||||||
for (auto edge_id : unpacked_edges)
|
auto node_from = unpacked_nodes.begin(), node_last = std::prev(unpacked_nodes.end());
|
||||||
|
for (auto edge = unpacked_edges.begin(); node_from != node_last; ++node_from, ++edge)
|
||||||
{
|
{
|
||||||
const auto &edge_data = facade.GetEdgeData(edge_id);
|
const auto &edge_data = facade.GetEdgeData(*edge);
|
||||||
const auto turn_id = edge_data.turn_id; // edge-based edge ID
|
const auto turn_id = edge_data.turn_id; // edge-based graph edge index
|
||||||
const auto ebg_node_id = facade.GetEdgeBasedNodeID(turn_id); // edge-based source node ID
|
const auto node_id = *node_from; // edge-based graph node index
|
||||||
const auto name_index = facade.GetNameIndex(ebg_node_id);
|
const auto name_index = facade.GetNameIndex(node_id);
|
||||||
const auto turn_instruction = facade.GetTurnInstructionForEdgeID(turn_id);
|
const auto turn_instruction = facade.GetTurnInstructionForEdgeID(turn_id);
|
||||||
const extractor::TravelMode travel_mode =
|
const extractor::TravelMode travel_mode =
|
||||||
(unpacked_path.empty() && start_traversed_in_reverse)
|
(unpacked_path.empty() && start_traversed_in_reverse)
|
||||||
? phantom_node_pair.source_phantom.backward_travel_mode
|
? phantom_node_pair.source_phantom.backward_travel_mode
|
||||||
: facade.GetTravelMode(ebg_node_id);
|
: facade.GetTravelMode(node_id);
|
||||||
|
|
||||||
const auto geometry_index = facade.GetGeometryIndex(ebg_node_id);
|
const auto geometry_index = facade.GetGeometryIndex(node_id);
|
||||||
std::vector<NodeID> id_vector;
|
std::vector<NodeID> id_vector;
|
||||||
|
|
||||||
std::vector<EdgeWeight> weight_vector;
|
std::vector<EdgeWeight> weight_vector;
|
||||||
|
@ -299,22 +299,25 @@ void unpackPath(const FacadeT &facade,
|
|||||||
const auto nodes_number = std::distance(packed_path_begin, packed_path_end);
|
const auto nodes_number = std::distance(packed_path_begin, packed_path_end);
|
||||||
BOOST_ASSERT(nodes_number > 0);
|
BOOST_ASSERT(nodes_number > 0);
|
||||||
|
|
||||||
|
std::vector<NodeID> unpacked_nodes;
|
||||||
std::vector<EdgeID> unpacked_edges;
|
std::vector<EdgeID> unpacked_edges;
|
||||||
|
unpacked_nodes.reserve(nodes_number);
|
||||||
|
unpacked_edges.reserve(nodes_number);
|
||||||
|
|
||||||
auto source_node = *packed_path_begin, target_node = *packed_path_begin;
|
unpacked_nodes.push_back(*packed_path_begin);
|
||||||
if (nodes_number > 1)
|
if (nodes_number > 1)
|
||||||
{
|
{
|
||||||
target_node = *std::prev(packed_path_end);
|
unpackPath(facade,
|
||||||
unpacked_edges.reserve(std::distance(packed_path_begin, packed_path_end));
|
packed_path_begin,
|
||||||
unpackPath(
|
packed_path_end,
|
||||||
facade,
|
[&](std::pair<NodeID, NodeID> &edge, const auto &edge_id) {
|
||||||
packed_path_begin,
|
BOOST_ASSERT(edge.first == unpacked_nodes.back());
|
||||||
packed_path_end,
|
unpacked_nodes.push_back(edge.second);
|
||||||
[&facade, &unpacked_edges](std::pair<NodeID, NodeID> & /* edge */,
|
unpacked_edges.push_back(edge_id);
|
||||||
const auto &edge_id) { unpacked_edges.push_back(edge_id); });
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
annotatePath(facade, source_node, target_node, unpacked_edges, phantom_nodes, unpacked_path);
|
annotatePath(facade, phantom_nodes, unpacked_nodes, unpacked_edges, unpacked_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -180,7 +180,7 @@ void routingStep(const datafacade::ContiguousInternalMemoryDataFacade<Algorithm>
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
std::tuple<EdgeWeight, NodeID, NodeID, std::vector<EdgeID>>
|
std::tuple<EdgeWeight, std::vector<NodeID>, std::vector<EdgeID>>
|
||||||
search(SearchEngineData<Algorithm> &engine_working_data,
|
search(SearchEngineData<Algorithm> &engine_working_data,
|
||||||
const datafacade::ContiguousInternalMemoryDataFacade<Algorithm> &facade,
|
const datafacade::ContiguousInternalMemoryDataFacade<Algorithm> &facade,
|
||||||
SearchEngineData<Algorithm>::QueryHeap &forward_heap,
|
SearchEngineData<Algorithm>::QueryHeap &forward_heap,
|
||||||
@ -235,8 +235,7 @@ search(SearchEngineData<Algorithm> &engine_working_data,
|
|||||||
// No path found for both target nodes?
|
// No path found for both target nodes?
|
||||||
if (weight >= weight_upper_bound || SPECIAL_NODEID == middle)
|
if (weight >= weight_upper_bound || SPECIAL_NODEID == middle)
|
||||||
{
|
{
|
||||||
return std::make_tuple(
|
return std::make_tuple(INVALID_EDGE_WEIGHT, std::vector<NodeID>(), std::vector<EdgeID>());
|
||||||
INVALID_EDGE_WEIGHT, SPECIAL_NODEID, SPECIAL_NODEID, std::vector<EdgeID>());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get packed path as edges {from node ID, to node ID, edge ID}
|
// Get packed path as edges {from node ID, to node ID, edge ID}
|
||||||
@ -260,11 +259,14 @@ search(SearchEngineData<Algorithm> &engine_working_data,
|
|||||||
current_node = parent_node;
|
current_node = parent_node;
|
||||||
parent_node = reverse_heap.GetData(parent_node).parent;
|
parent_node = reverse_heap.GetData(parent_node).parent;
|
||||||
}
|
}
|
||||||
const NodeID target_node = current_node;
|
|
||||||
|
|
||||||
// Unpack path
|
// Unpack path
|
||||||
std::vector<EdgeID> unpacked_path;
|
std::vector<NodeID> unpacked_nodes;
|
||||||
unpacked_path.reserve(packed_path.size());
|
std::vector<EdgeID> unpacked_edges;
|
||||||
|
unpacked_nodes.reserve(packed_path.size());
|
||||||
|
unpacked_edges.reserve(packed_path.size());
|
||||||
|
|
||||||
|
unpacked_nodes.push_back(source_node);
|
||||||
for (auto const &packed_edge : packed_path)
|
for (auto const &packed_edge : packed_path)
|
||||||
{
|
{
|
||||||
NodeID source, target;
|
NodeID source, target;
|
||||||
@ -272,7 +274,8 @@ search(SearchEngineData<Algorithm> &engine_working_data,
|
|||||||
std::tie(source, target, overlay_edge) = packed_edge;
|
std::tie(source, target, overlay_edge) = packed_edge;
|
||||||
if (!overlay_edge)
|
if (!overlay_edge)
|
||||||
{ // a base graph edge
|
{ // a base graph edge
|
||||||
unpacked_path.push_back(facade.FindEdge(source, target));
|
unpacked_nodes.push_back(target);
|
||||||
|
unpacked_edges.push_back(facade.FindEdge(source, target));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // an overlay graph edge
|
{ // an overlay graph edge
|
||||||
@ -291,26 +294,28 @@ search(SearchEngineData<Algorithm> &engine_working_data,
|
|||||||
// TODO: when structured bindings will be allowed change to
|
// TODO: when structured bindings will be allowed change to
|
||||||
// auto [subpath_weight, subpath_source, subpath_target, subpath] = ...
|
// auto [subpath_weight, subpath_source, subpath_target, subpath] = ...
|
||||||
EdgeWeight subpath_weight;
|
EdgeWeight subpath_weight;
|
||||||
NodeID subpath_source, subpath_target;
|
std::vector<NodeID> subpath_nodes;
|
||||||
std::vector<EdgeID> subpath;
|
std::vector<EdgeID> subpath_edges;
|
||||||
std::tie(subpath_weight, subpath_source, subpath_target, subpath) =
|
std::tie(subpath_weight, subpath_nodes, subpath_edges) = search(engine_working_data,
|
||||||
search(engine_working_data,
|
facade,
|
||||||
facade,
|
forward_heap,
|
||||||
forward_heap,
|
reverse_heap,
|
||||||
reverse_heap,
|
force_loop_forward,
|
||||||
force_loop_forward,
|
force_loop_reverse,
|
||||||
force_loop_reverse,
|
INVALID_EDGE_WEIGHT,
|
||||||
INVALID_EDGE_WEIGHT,
|
sublevel,
|
||||||
sublevel,
|
parent_cell_id);
|
||||||
parent_cell_id);
|
BOOST_ASSERT(!subpath_edges.empty());
|
||||||
BOOST_ASSERT(!subpath.empty());
|
BOOST_ASSERT(subpath_nodes.size() > 1);
|
||||||
BOOST_ASSERT(subpath_source == source);
|
BOOST_ASSERT(subpath_nodes.front() == source);
|
||||||
BOOST_ASSERT(subpath_target == target);
|
BOOST_ASSERT(subpath_nodes.back() == target);
|
||||||
unpacked_path.insert(unpacked_path.end(), subpath.begin(), subpath.end());
|
unpacked_nodes.insert(
|
||||||
|
unpacked_nodes.end(), std::next(subpath_nodes.begin()), subpath_nodes.end());
|
||||||
|
unpacked_edges.insert(unpacked_edges.end(), subpath_edges.begin(), subpath_edges.end());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::make_tuple(weight, source_node, target_node, std::move(unpacked_path));
|
return std::make_tuple(weight, std::move(unpacked_nodes), std::move(unpacked_edges));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO reorder parameters
|
// TODO reorder parameters
|
||||||
@ -326,27 +331,18 @@ inline void search(SearchEngineData<Algorithm> &engine_working_data,
|
|||||||
const PhantomNodes &phantom_nodes,
|
const PhantomNodes &phantom_nodes,
|
||||||
const EdgeWeight weight_upper_bound = INVALID_EDGE_WEIGHT)
|
const EdgeWeight weight_upper_bound = INVALID_EDGE_WEIGHT)
|
||||||
{
|
{
|
||||||
NodeID source_node, target_node;
|
// TODO: change search calling interface to use unpacked_edges result
|
||||||
std::vector<EdgeID> unpacked_edges;
|
std::tie(weight, packed_leg, std::ignore) = mld::search(engine_working_data,
|
||||||
std::tie(weight, source_node, target_node, unpacked_edges) = mld::search(engine_working_data,
|
facade,
|
||||||
facade,
|
forward_heap,
|
||||||
forward_heap,
|
reverse_heap,
|
||||||
reverse_heap,
|
force_loop_forward,
|
||||||
force_loop_forward,
|
force_loop_reverse,
|
||||||
force_loop_reverse,
|
weight_upper_bound,
|
||||||
weight_upper_bound,
|
phantom_nodes);
|
||||||
phantom_nodes);
|
|
||||||
|
|
||||||
if (weight != INVALID_EDGE_WEIGHT)
|
|
||||||
{
|
|
||||||
packed_leg.push_back(source_node);
|
|
||||||
std::transform(unpacked_edges.begin(),
|
|
||||||
unpacked_edges.end(),
|
|
||||||
std::back_inserter(packed_leg),
|
|
||||||
[&facade](const auto edge) { return facade.GetTarget(edge); });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: remove CH-related stub
|
||||||
template <typename RandomIter, typename FacadeT>
|
template <typename RandomIter, typename FacadeT>
|
||||||
void unpackPath(const FacadeT &facade,
|
void unpackPath(const FacadeT &facade,
|
||||||
RandomIter packed_path_begin,
|
RandomIter packed_path_begin,
|
||||||
@ -357,21 +353,24 @@ void unpackPath(const FacadeT &facade,
|
|||||||
const auto nodes_number = std::distance(packed_path_begin, packed_path_end);
|
const auto nodes_number = std::distance(packed_path_begin, packed_path_end);
|
||||||
BOOST_ASSERT(nodes_number > 0);
|
BOOST_ASSERT(nodes_number > 0);
|
||||||
|
|
||||||
|
std::vector<NodeID> unpacked_nodes;
|
||||||
std::vector<EdgeID> unpacked_edges;
|
std::vector<EdgeID> unpacked_edges;
|
||||||
|
unpacked_nodes.reserve(nodes_number);
|
||||||
|
unpacked_edges.reserve(nodes_number);
|
||||||
|
|
||||||
auto source_node = *packed_path_begin, target_node = *packed_path_begin;
|
unpacked_nodes.push_back(*packed_path_begin);
|
||||||
|
|
||||||
if (nodes_number > 1)
|
if (nodes_number > 1)
|
||||||
{
|
{
|
||||||
target_node = *std::prev(packed_path_end);
|
util::for_each_pair(
|
||||||
util::for_each_pair(packed_path_begin,
|
packed_path_begin,
|
||||||
packed_path_end,
|
packed_path_end,
|
||||||
[&facade, &unpacked_edges](const auto from, const auto to) {
|
[&facade, &unpacked_nodes, &unpacked_edges](const auto from, const auto to) {
|
||||||
unpacked_edges.push_back(facade.FindEdge(from, to));
|
unpacked_nodes.push_back(to);
|
||||||
});
|
unpacked_edges.push_back(facade.FindEdge(from, to));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
annotatePath(facade, source_node, target_node, unpacked_edges, phantom_nodes, unpacked_path);
|
annotatePath(facade, phantom_nodes, unpacked_nodes, unpacked_edges, unpacked_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline double
|
inline double
|
||||||
@ -390,22 +389,23 @@ getNetworkDistance(SearchEngineData<Algorithm> &engine_working_data,
|
|||||||
insertNodesInHeaps(forward_heap, reverse_heap, phantom_nodes);
|
insertNodesInHeaps(forward_heap, reverse_heap, phantom_nodes);
|
||||||
|
|
||||||
EdgeWeight weight;
|
EdgeWeight weight;
|
||||||
NodeID source_node, target_node;
|
std::vector<NodeID> unpacked_nodes;
|
||||||
std::vector<EdgeID> unpacked_edges;
|
std::vector<EdgeID> unpacked_edges;
|
||||||
std::tie(weight, source_node, target_node, unpacked_edges) = search(engine_working_data,
|
std::tie(weight, unpacked_nodes, unpacked_edges) = search(engine_working_data,
|
||||||
facade,
|
facade,
|
||||||
forward_heap,
|
forward_heap,
|
||||||
reverse_heap,
|
reverse_heap,
|
||||||
DO_NOT_FORCE_LOOPS,
|
DO_NOT_FORCE_LOOPS,
|
||||||
DO_NOT_FORCE_LOOPS,
|
DO_NOT_FORCE_LOOPS,
|
||||||
weight_upper_bound,
|
weight_upper_bound,
|
||||||
phantom_nodes);
|
phantom_nodes);
|
||||||
|
|
||||||
if (weight == INVALID_EDGE_WEIGHT)
|
if (weight == INVALID_EDGE_WEIGHT)
|
||||||
return std::numeric_limits<double>::max();
|
return std::numeric_limits<double>::max();
|
||||||
|
|
||||||
std::vector<PathData> unpacked_path;
|
std::vector<PathData> unpacked_path;
|
||||||
annotatePath(facade, source_node, target_node, unpacked_edges, phantom_nodes, unpacked_path);
|
|
||||||
|
annotatePath(facade, phantom_nodes, unpacked_nodes, unpacked_edges, unpacked_path);
|
||||||
|
|
||||||
return getPathDistance(facade, unpacked_path, source_phantom, target_phantom);
|
return getPathDistance(facade, unpacked_path, source_phantom, target_phantom);
|
||||||
}
|
}
|
||||||
|
@ -15,13 +15,12 @@ template <typename AlgorithmT>
|
|||||||
InternalRouteResult
|
InternalRouteResult
|
||||||
extractRoute(const datafacade::ContiguousInternalMemoryDataFacade<AlgorithmT> &facade,
|
extractRoute(const datafacade::ContiguousInternalMemoryDataFacade<AlgorithmT> &facade,
|
||||||
const EdgeWeight weight,
|
const EdgeWeight weight,
|
||||||
const NodeID source_node,
|
const PhantomNodes &phantom_nodes,
|
||||||
const NodeID target_node,
|
const std::vector<NodeID> &unpacked_nodes,
|
||||||
const std::vector<EdgeID> &edges,
|
const std::vector<EdgeID> &unpacked_edges)
|
||||||
const PhantomNodes &nodes)
|
|
||||||
{
|
{
|
||||||
InternalRouteResult raw_route_data;
|
InternalRouteResult raw_route_data;
|
||||||
raw_route_data.segment_end_coordinates = {nodes};
|
raw_route_data.segment_end_coordinates = {phantom_nodes};
|
||||||
// No path found for both target nodes?
|
// No path found for both target nodes?
|
||||||
if (INVALID_EDGE_WEIGHT == weight)
|
if (INVALID_EDGE_WEIGHT == weight)
|
||||||
{
|
{
|
||||||
@ -33,15 +32,14 @@ extractRoute(const datafacade::ContiguousInternalMemoryDataFacade<AlgorithmT> &f
|
|||||||
raw_route_data.shortest_path_length = weight;
|
raw_route_data.shortest_path_length = weight;
|
||||||
raw_route_data.unpacked_path_segments.resize(1);
|
raw_route_data.unpacked_path_segments.resize(1);
|
||||||
raw_route_data.source_traversed_in_reverse.push_back(
|
raw_route_data.source_traversed_in_reverse.push_back(
|
||||||
(source_node != nodes.source_phantom.forward_segment_id.id));
|
(unpacked_nodes.front() != phantom_nodes.source_phantom.forward_segment_id.id));
|
||||||
raw_route_data.target_traversed_in_reverse.push_back(
|
raw_route_data.target_traversed_in_reverse.push_back(
|
||||||
(target_node != nodes.target_phantom.forward_segment_id.id));
|
(unpacked_nodes.back() != phantom_nodes.target_phantom.forward_segment_id.id));
|
||||||
|
|
||||||
annotatePath(facade,
|
annotatePath(facade,
|
||||||
source_node,
|
phantom_nodes,
|
||||||
target_node,
|
unpacked_nodes,
|
||||||
edges,
|
unpacked_edges,
|
||||||
nodes,
|
|
||||||
raw_route_data.unpacked_path_segments.front());
|
raw_route_data.unpacked_path_segments.front());
|
||||||
|
|
||||||
return raw_route_data;
|
return raw_route_data;
|
||||||
@ -81,22 +79,26 @@ InternalRouteResult directShortestPathSearchImpl(
|
|||||||
DO_NOT_FORCE_LOOPS,
|
DO_NOT_FORCE_LOOPS,
|
||||||
phantom_nodes);
|
phantom_nodes);
|
||||||
|
|
||||||
|
std::vector<NodeID> unpacked_nodes;
|
||||||
std::vector<EdgeID> unpacked_edges;
|
std::vector<EdgeID> unpacked_edges;
|
||||||
auto source_node = SPECIAL_NODEID, target_node = SPECIAL_NODEID;
|
|
||||||
if (!packed_leg.empty())
|
if (!packed_leg.empty())
|
||||||
{
|
{
|
||||||
source_node = packed_leg.front();
|
unpacked_nodes.reserve(packed_leg.size());
|
||||||
target_node = packed_leg.back();
|
|
||||||
unpacked_edges.reserve(packed_leg.size());
|
unpacked_edges.reserve(packed_leg.size());
|
||||||
ch::unpackPath(
|
unpacked_nodes.push_back(packed_leg.front());
|
||||||
facade,
|
ch::unpackPath(facade,
|
||||||
packed_leg.begin(),
|
packed_leg.begin(),
|
||||||
packed_leg.end(),
|
packed_leg.end(),
|
||||||
[&facade, &unpacked_edges](std::pair<NodeID, NodeID> & /* edge */,
|
[&unpacked_nodes, &unpacked_edges](std::pair<NodeID, NodeID> &edge,
|
||||||
const auto &edge_id) { unpacked_edges.push_back(edge_id); });
|
const auto &edge_id) {
|
||||||
|
BOOST_ASSERT(edge.first == unpacked_nodes.back());
|
||||||
|
unpacked_nodes.push_back(edge.second);
|
||||||
|
unpacked_edges.push_back(edge_id);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return extractRoute(facade, weight, source_node, target_node, unpacked_edges, phantom_nodes);
|
return extractRoute(facade, weight, phantom_nodes, unpacked_nodes, unpacked_edges);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace ch
|
} // namespace ch
|
||||||
@ -130,18 +132,18 @@ InternalRouteResult directShortestPathSearch(
|
|||||||
// TODO: when structured bindings will be allowed change to
|
// TODO: when structured bindings will be allowed change to
|
||||||
// auto [weight, source_node, target_node, unpacked_edges] = ...
|
// auto [weight, source_node, target_node, unpacked_edges] = ...
|
||||||
EdgeWeight weight;
|
EdgeWeight weight;
|
||||||
NodeID source_node, target_node;
|
std::vector<NodeID> unpacked_nodes;
|
||||||
std::vector<EdgeID> unpacked_edges;
|
std::vector<EdgeID> unpacked_edges;
|
||||||
std::tie(weight, source_node, target_node, unpacked_edges) = mld::search(engine_working_data,
|
std::tie(weight, unpacked_nodes, unpacked_edges) = mld::search(engine_working_data,
|
||||||
facade,
|
facade,
|
||||||
forward_heap,
|
forward_heap,
|
||||||
reverse_heap,
|
reverse_heap,
|
||||||
DO_NOT_FORCE_LOOPS,
|
DO_NOT_FORCE_LOOPS,
|
||||||
DO_NOT_FORCE_LOOPS,
|
DO_NOT_FORCE_LOOPS,
|
||||||
INVALID_EDGE_WEIGHT,
|
INVALID_EDGE_WEIGHT,
|
||||||
phantom_nodes);
|
phantom_nodes);
|
||||||
|
|
||||||
return extractRoute(facade, weight, source_node, target_node, unpacked_edges, phantom_nodes);
|
return extractRoute(facade, weight, phantom_nodes, unpacked_nodes, unpacked_edges);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace routing_algorithms
|
} // namespace routing_algorithms
|
||||||
|
Loading…
Reference in New Issue
Block a user