Remove GetEdgeBasedNodeID from TurnDataContainer
This commit is contained in:
committed by
Patrick Niklaus
parent
40d0297885
commit
88082c48cf
@@ -345,11 +345,6 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade
|
||||
|
||||
void InitializeEdgeInformationPointers(storage::DataLayout &layout, char *memory_ptr)
|
||||
{
|
||||
auto node_ids_list_ptr =
|
||||
layout.GetBlockPtr<NodeID>(memory_ptr, storage::DataLayout::EDGE_BASED_NODE_ID_LIST);
|
||||
util::vector_view<NodeID> node_ids(
|
||||
node_ids_list_ptr, layout.num_entries[storage::DataLayout::EDGE_BASED_NODE_ID_LIST]);
|
||||
|
||||
const auto lane_data_id_ptr =
|
||||
layout.GetBlockPtr<LaneDataID>(memory_ptr, storage::DataLayout::LANE_DATA_ID);
|
||||
util::vector_view<LaneDataID> lane_data_ids(
|
||||
@@ -376,8 +371,7 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade
|
||||
util::vector_view<util::guidance::TurnBearing> post_turn_bearings(
|
||||
post_turn_bearing_ptr, layout.num_entries[storage::DataLayout::POST_TURN_BEARING]);
|
||||
|
||||
turn_data = extractor::TurnDataView(std::move(node_ids),
|
||||
std::move(turn_instructions),
|
||||
turn_data = extractor::TurnDataView(std::move(turn_instructions),
|
||||
std::move(lane_data_ids),
|
||||
std::move(entry_class_ids),
|
||||
std::move(pre_turn_bearings),
|
||||
@@ -624,11 +618,6 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade
|
||||
return m_turn_duration_penalties[id];
|
||||
}
|
||||
|
||||
NodeID GetEdgeBasedNodeID(const EdgeID id) const override final
|
||||
{
|
||||
return turn_data.GetNodeID(id);
|
||||
}
|
||||
|
||||
extractor::guidance::TurnInstruction
|
||||
GetTurnInstructionForEdgeID(const EdgeID id) const override final
|
||||
{
|
||||
|
||||
@@ -79,8 +79,6 @@ class BaseDataFacade
|
||||
// Gets the name of a datasource
|
||||
virtual StringView GetDatasourceName(const DatasourceID id) const = 0;
|
||||
|
||||
virtual NodeID GetEdgeBasedNodeID(const NodeID id) const = 0;
|
||||
|
||||
virtual extractor::guidance::TurnInstruction
|
||||
GetTurnInstructionForEdgeID(const EdgeID id) const = 0;
|
||||
|
||||
|
||||
@@ -59,7 +59,6 @@ template <storage::Ownership Ownership>
|
||||
inline void read(storage::io::FileReader &reader,
|
||||
detail::TurnDataContainerImpl<Ownership> &turn_data_container)
|
||||
{
|
||||
storage::serialization::read(reader, turn_data_container.node_data_ids);
|
||||
storage::serialization::read(reader, turn_data_container.turn_instructions);
|
||||
storage::serialization::read(reader, turn_data_container.lane_data_ids);
|
||||
storage::serialization::read(reader, turn_data_container.entry_class_ids);
|
||||
@@ -71,7 +70,6 @@ template <storage::Ownership Ownership>
|
||||
inline void write(storage::io::FileWriter &writer,
|
||||
const detail::TurnDataContainerImpl<Ownership> &turn_data_container)
|
||||
{
|
||||
storage::serialization::write(writer, turn_data_container.node_data_ids);
|
||||
storage::serialization::write(writer, turn_data_container.turn_instructions);
|
||||
storage::serialization::write(writer, turn_data_container.lane_data_ids);
|
||||
storage::serialization::write(writer, turn_data_container.entry_class_ids);
|
||||
|
||||
@@ -40,21 +40,18 @@ template <storage::Ownership Ownership> class TurnDataContainerImpl
|
||||
public:
|
||||
TurnDataContainerImpl() = default;
|
||||
|
||||
TurnDataContainerImpl(Vector<NodeID> node_data_ids,
|
||||
Vector<extractor::guidance::TurnInstruction> turn_instructions,
|
||||
TurnDataContainerImpl(Vector<extractor::guidance::TurnInstruction> turn_instructions,
|
||||
Vector<LaneDataID> lane_data_ids,
|
||||
Vector<EntryClassID> entry_class_ids,
|
||||
Vector<util::guidance::TurnBearing> pre_turn_bearings,
|
||||
Vector<util::guidance::TurnBearing> post_turn_bearings)
|
||||
: node_data_ids(std::move(node_data_ids)), turn_instructions(std::move(turn_instructions)),
|
||||
lane_data_ids(std::move(lane_data_ids)), entry_class_ids(std::move(entry_class_ids)),
|
||||
: turn_instructions(std::move(turn_instructions)), lane_data_ids(std::move(lane_data_ids)),
|
||||
entry_class_ids(std::move(entry_class_ids)),
|
||||
pre_turn_bearings(std::move(pre_turn_bearings)),
|
||||
post_turn_bearings(std::move(post_turn_bearings))
|
||||
{
|
||||
}
|
||||
|
||||
NodeID GetNodeID(const EdgeID id) const { return node_data_ids[id]; }
|
||||
|
||||
EntryClassID GetEntryClassID(const EdgeID id) const { return entry_class_ids[id]; }
|
||||
|
||||
util::guidance::TurnBearing GetPreTurnBearing(const EdgeID id) const
|
||||
@@ -78,14 +75,12 @@ template <storage::Ownership Ownership> class TurnDataContainerImpl
|
||||
|
||||
// Used by EdgeBasedGraphFactory to fill data structure
|
||||
template <typename = std::enable_if<Ownership == storage::Ownership::Container>>
|
||||
void push_back(NodeID node_data_id,
|
||||
extractor::guidance::TurnInstruction turn_instruction,
|
||||
void push_back(extractor::guidance::TurnInstruction turn_instruction,
|
||||
LaneDataID lane_data_id,
|
||||
EntryClassID entry_class_id,
|
||||
util::guidance::TurnBearing pre_turn_bearing,
|
||||
util::guidance::TurnBearing post_turn_bearing)
|
||||
{
|
||||
node_data_ids.push_back(node_data_id);
|
||||
turn_instructions.push_back(turn_instruction);
|
||||
lane_data_ids.push_back(lane_data_id);
|
||||
entry_class_ids.push_back(entry_class_id);
|
||||
@@ -99,7 +94,6 @@ template <storage::Ownership Ownership> class TurnDataContainerImpl
|
||||
const TurnDataContainerImpl &turn_data_container);
|
||||
|
||||
private:
|
||||
Vector<NodeID> node_data_ids;
|
||||
Vector<extractor::guidance::TurnInstruction> turn_instructions;
|
||||
Vector<LaneDataID> lane_data_ids;
|
||||
Vector<EntryClassID> entry_class_ids;
|
||||
|
||||
@@ -26,7 +26,6 @@ const constexpr char *block_id_to_name[] = {"NAME_CHAR_DATA",
|
||||
"CH_GRAPH_EDGE_LIST",
|
||||
"COORDINATE_LIST",
|
||||
"OSM_NODE_ID_LIST",
|
||||
"EDGE_BASED_NODE_ID_LIST",
|
||||
"TURN_INSTRUCTION",
|
||||
"ENTRY_CLASSID",
|
||||
"R_SEARCH_TREE",
|
||||
@@ -80,7 +79,6 @@ struct DataLayout
|
||||
CH_GRAPH_EDGE_LIST,
|
||||
COORDINATE_LIST,
|
||||
OSM_NODE_ID_LIST,
|
||||
EDGE_BASED_NODE_ID_LIST,
|
||||
TURN_INSTRUCTION,
|
||||
ENTRY_CLASSID,
|
||||
R_SEARCH_TREE,
|
||||
|
||||
Reference in New Issue
Block a user