Remove GetEdgeBasedNodeID from TurnDataContainer
This commit is contained in:
committed by
Patrick Niklaus
parent
40d0297885
commit
88082c48cf
@@ -495,7 +495,6 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
|
||||
|
||||
// the following is the core of the loop.
|
||||
turn_data_container.push_back(
|
||||
edge_data1.edge_id,
|
||||
turn.instruction,
|
||||
turn.lane_data_id,
|
||||
entry_class_id,
|
||||
|
||||
@@ -234,7 +234,6 @@ void Storage::PopulateLayout(DataLayout &layout)
|
||||
const auto number_of_original_edges = edges_file.ReadElementCount64();
|
||||
|
||||
// note: settings this all to the same size is correct, we extract them from the same struct
|
||||
layout.SetBlockSize<NodeID>(DataLayout::EDGE_BASED_NODE_ID_LIST, number_of_original_edges);
|
||||
layout.SetBlockSize<util::guidance::TurnBearing>(DataLayout::PRE_TURN_BEARING,
|
||||
number_of_original_edges);
|
||||
layout.SetBlockSize<util::guidance::TurnBearing>(DataLayout::POST_TURN_BEARING,
|
||||
@@ -605,11 +604,6 @@ void Storage::PopulateData(const DataLayout &layout, char *memory_ptr)
|
||||
|
||||
// Load original edge data
|
||||
{
|
||||
auto node_id_list_ptr = layout.GetBlockPtr<NodeID, true>(
|
||||
memory_ptr, storage::DataLayout::EDGE_BASED_NODE_ID_LIST);
|
||||
util::vector_view<NodeID> node_ids(
|
||||
node_id_list_ptr, layout.num_entries[storage::DataLayout::EDGE_BASED_NODE_ID_LIST]);
|
||||
|
||||
const auto lane_data_id_ptr =
|
||||
layout.GetBlockPtr<LaneDataID, true>(memory_ptr, storage::DataLayout::LANE_DATA_ID);
|
||||
util::vector_view<LaneDataID> lane_data_ids(
|
||||
@@ -636,8 +630,7 @@ void Storage::PopulateData(const DataLayout &layout, char *memory_ptr)
|
||||
util::vector_view<util::guidance::TurnBearing> post_turn_bearings(
|
||||
post_turn_bearing_ptr, layout.num_entries[storage::DataLayout::POST_TURN_BEARING]);
|
||||
|
||||
extractor::TurnDataView turn_data(std::move(node_ids),
|
||||
std::move(turn_instructions),
|
||||
extractor::TurnDataView turn_data(std::move(turn_instructions),
|
||||
std::move(lane_data_ids),
|
||||
std::move(entry_class_ids),
|
||||
std::move(pre_turn_bearings),
|
||||
|
||||
@@ -84,7 +84,7 @@ void checkWeightsConsistency(
|
||||
|
||||
for (auto &edge : edge_based_edge_list)
|
||||
{
|
||||
const auto node_id = turn_data.GetNodeID(edge.data.turn_id);
|
||||
const auto node_id = edge.source;
|
||||
const auto geometry_id = node_data.GetGeometryID(node_id);
|
||||
|
||||
if (geometry_id.forward)
|
||||
@@ -537,8 +537,8 @@ Updater::LoadAndUpdateEdgeExpandedGraph(std::vector<extractor::EdgeBasedEdge> &e
|
||||
std::transform(updated_turn_penalties.begin(),
|
||||
updated_turn_penalties.end(),
|
||||
updated_segments.begin() + offset,
|
||||
[&node_data, &turn_data](const std::uint64_t turn_id) {
|
||||
const auto node_id = turn_data.GetNodeID(turn_id);
|
||||
[&node_data, &edge_based_edge_list](const std::uint64_t turn_id) {
|
||||
const auto node_id = edge_based_edge_list[turn_id].source;
|
||||
return node_data.GetGeometryID(node_id);
|
||||
});
|
||||
}
|
||||
@@ -598,7 +598,7 @@ Updater::LoadAndUpdateEdgeExpandedGraph(std::vector<extractor::EdgeBasedEdge> &e
|
||||
});
|
||||
|
||||
const auto update_edge = [&](extractor::EdgeBasedEdge &edge) {
|
||||
const auto node_id = turn_data.GetNodeID(edge.data.turn_id);
|
||||
const auto node_id = edge.source;
|
||||
const auto geometry_id = node_data.GetGeometryID(node_id);
|
||||
auto updated_iter = std::lower_bound(updated_segments.begin(),
|
||||
updated_segments.end(),
|
||||
|
||||
Reference in New Issue
Block a user