/srv/osrm/osrm-backend/include/extractor
NameSizeModeActions
intersection/-0755rm
class_data.hpp9810644editdlrm
compressed_edge_container.hpp33360644editdlrm
compressed_node_based_graph_edge.hpp4180644editdlrm
conditional_turn_penalty.hpp5890644editdlrm
datasources.hpp12070644editdlrm
edge_based_edge.hpp34670644editdlrm
edge_based_graph_factory.hpp77870644editdlrm
edge_based_node.hpp3830644editdlrm
edge_based_node_segment.hpp20500644editdlrm
extraction_containers.hpp36790644editdlrm
extraction_helper_functions.hpp48270644editdlrm
extraction_node.hpp4590644editdlrm
extraction_relation.hpp59490644editdlrm
extraction_segment.hpp7150644editdlrm
extraction_turn.hpp49830644editdlrm
extraction_way.hpp42680644editdlrm
extractor.hpp52670644editdlrm
extractor_callbacks.hpp32490644editdlrm
extractor_config.hpp30400644editdlrm
files.hpp243720644editdlrm
graph_compressor.hpp12710644editdlrm
internal_extractor_edge.hpp26420644editdlrm
intersection_bearings_container.hpp44870644editdlrm
location_dependent_data.hpp17970644editdlrm
maneuver_override.hpp54560644editdlrm
maneuver_override_relation_parser.hpp17850644editdlrm
name_table.hpp35960644editdlrm
nbg_to_ebg.hpp4500644editdlrm
nodes_of_way.hpp14110644editdlrm
node_based_edge.hpp80240644editdlrm
node_based_graph_factory.hpp51550644editdlrm
node_data_container.hpp45580644editdlrm
node_restriction_map.hpp22920644editdlrm
packed_osm_ids.hpp5200644editdlrm
profile_properties.hpp50290644editdlrm
query_node.hpp14110644editdlrm
raster_source.hpp50020644editdlrm
restriction.hpp17500644editdlrm
restriction_graph.hpp45000644editdlrm
restriction_parser.hpp17680644editdlrm
road_classification.hpp83900644editdlrm
scripting_environment.hpp24260644editdlrm
scripting_environment_lua.hpp42530644editdlrm
segment_data_container.hpp80320644editdlrm
serialization.hpp88340644editdlrm
suffix_table.hpp14070644editdlrm
traffic_lights.hpp5140644editdlrm
traffic_signals.hpp6560644editdlrm
travel_mode.hpp36660644editdlrm
turn_lane_types.hpp37540644editdlrm
turn_path.hpp74830644editdlrm
turn_path_compressor.hpp22200644editdlrm
turn_path_filter.hpp6690644editdlrm
way_restriction_map.hpp31140644editdlrm
Edit: /srv/osrm/osrm-backend/include/extractor/segment_data_container.hpp (8032B)
#ifndef OSRM_EXTRACTOR_SEGMENT_DATA_CONTAINER_HPP_ #define OSRM_EXTRACTOR_SEGMENT_DATA_CONTAINER_HPP_ #include "util/packed_vector.hpp" #include "util/typedefs.hpp" #include "util/vector_view.hpp" #include "storage/shared_memory_ownership.hpp" #include "storage/tar_fwd.hpp" #include #include #include #include #include #include namespace osrm::extractor { class CompressedEdgeContainer; namespace detail { template class SegmentDataContainerImpl; } // namespace detail namespace serialization { template inline void read(storage::tar::FileReader &reader, const std::string &name, detail::SegmentDataContainerImpl &segment_data); template inline void write(storage::tar::FileWriter &writer, const std::string &name, const detail::SegmentDataContainerImpl &segment_data); } // namespace serialization namespace detail { template class SegmentDataContainerImpl { template using Vector = util::ViewOrVector; template using PackedVector = util::detail::PackedVector; friend CompressedEdgeContainer; public: // FIXME We should change the indexing to Edge-Based-Node id using DirectionalGeometryID = std::uint32_t; using SegmentOffset = std::uint32_t; using SegmentNodeVector = Vector; using SegmentWeightVector = PackedVector; using SegmentDurationVector = PackedVector; using SegmentDatasourceVector = Vector; SegmentDataContainerImpl() = default; SegmentDataContainerImpl(Vector index_, SegmentNodeVector nodes_, SegmentWeightVector fwd_weights_, SegmentWeightVector rev_weights_, SegmentDurationVector fwd_durations_, SegmentDurationVector rev_durations_, SegmentDatasourceVector fwd_datasources_, SegmentDatasourceVector rev_datasources_) : index(std::move(index_)), nodes(std::move(nodes_)), fwd_weights(std::move(fwd_weights_)), rev_weights(std::move(rev_weights_)), fwd_durations(std::move(fwd_durations_)), rev_durations(std::move(rev_durations_)), fwd_datasources(std::move(fwd_datasources_)), rev_datasources(std::move(rev_datasources_)) { } auto GetForwardGeometry(const DirectionalGeometryID id) { const auto begin = nodes.begin() + index[id]; const auto end = nodes.begin() + index[id + 1]; return boost::make_iterator_range(begin, end); } auto GetReverseGeometry(const DirectionalGeometryID id) { return boost::adaptors::reverse(GetForwardGeometry(id)); } auto GetForwardDurations(const DirectionalGeometryID id) { const auto begin = fwd_durations.begin() + index[id] + 1; const auto end = fwd_durations.begin() + index[id + 1]; return boost::make_iterator_range(begin, end); } auto GetReverseDurations(const DirectionalGeometryID id) { const auto begin = rev_durations.begin() + index[id]; const auto end = rev_durations.begin() + index[id + 1] - 1; return boost::adaptors::reverse(boost::make_iterator_range(begin, end)); } auto GetForwardWeights(const DirectionalGeometryID id) { const auto begin = fwd_weights.begin() + index[id] + 1; const auto end = fwd_weights.begin() + index[id + 1]; return boost::make_iterator_range(begin, end); } auto GetReverseWeights(const DirectionalGeometryID id) { const auto begin = rev_weights.begin() + index[id]; const auto end = rev_weights.begin() + index[id + 1] - 1; return boost::adaptors::reverse(boost::make_iterator_range(begin, end)); } auto GetForwardDatasources(const DirectionalGeometryID id) { const auto begin = fwd_datasources.begin() + index[id] + 1; const auto end = fwd_datasources.begin() + index[id + 1]; return boost::make_iterator_range(begin, end); } auto GetReverseDatasources(const DirectionalGeometryID id) { const auto begin = rev_datasources.begin() + index[id]; const auto end = rev_datasources.begin() + index[id + 1] - 1; return boost::adaptors::reverse(boost::make_iterator_range(begin, end)); } auto GetForwardGeometry(const DirectionalGeometryID id) const { const auto begin = nodes.cbegin() + index[id]; const auto end = nodes.cbegin() + index[id + 1]; return boost::make_iterator_range(begin, end); } auto GetReverseGeometry(const DirectionalGeometryID id) const { return boost::adaptors::reverse(GetForwardGeometry(id)); } auto GetForwardDurations(const DirectionalGeometryID id) const { const auto begin = fwd_durations.cbegin() + index[id] + 1; const auto end = fwd_durations.cbegin() + index[id + 1]; return boost::make_iterator_range(begin, end); } auto GetReverseDurations(const DirectionalGeometryID id) const { const auto begin = rev_durations.cbegin() + index[id]; const auto end = rev_durations.cbegin() + index[id + 1] - 1; return boost::adaptors::reverse(boost::make_iterator_range(begin, end)); } auto GetForwardWeights(const DirectionalGeometryID id) const { const auto begin = fwd_weights.cbegin() + index[id] + 1; const auto end = fwd_weights.cbegin() + index[id + 1]; return boost::make_iterator_range(begin, end); } auto GetReverseWeights(const DirectionalGeometryID id) const { const auto begin = rev_weights.cbegin() + index[id]; const auto end = rev_weights.cbegin() + index[id + 1] - 1; return boost::adaptors::reverse(boost::make_iterator_range(begin, end)); } auto GetForwardDatasources(const DirectionalGeometryID id) const { const auto begin = fwd_datasources.cbegin() + index[id] + 1; const auto end = fwd_datasources.cbegin() + index[id + 1]; return boost::make_iterator_range(begin, end); } auto GetReverseDatasources(const DirectionalGeometryID id) const { const auto begin = rev_datasources.cbegin() + index[id]; const auto end = rev_datasources.cbegin() + index[id + 1] - 1; return boost::adaptors::reverse(boost::make_iterator_range(begin, end)); } auto GetNumberOfGeometries() const { return index.size() - 1; } auto GetNumberOfSegments() const { return fwd_weights.size(); } friend void serialization::read(storage::tar::FileReader &reader, const std::string &name, detail::SegmentDataContainerImpl &segment_data); friend void serialization::write( storage::tar::FileWriter &writer, const std::string &name, const detail::SegmentDataContainerImpl &segment_data); private: Vector index; SegmentNodeVector nodes; SegmentWeightVector fwd_weights; SegmentWeightVector rev_weights; SegmentDurationVector fwd_durations; SegmentDurationVector rev_durations; SegmentDatasourceVector fwd_datasources; SegmentDatasourceVector rev_datasources; }; } // namespace detail using SegmentDataView = detail::SegmentDataContainerImpl; using SegmentDataContainer = detail::SegmentDataContainerImpl; } // namespace osrm::extractor #endif