osrm-backend/include/util
Michael Bell 7f014bd616 Clarify identifier types used in data facade
The data facade interface contains numerous methods for looking up
datapoints by identifiers.
Many of the parameters use the NodeID or EdgeID types. However, these two
identifier types are used for representing three different contexts:

1. Node-based graph edges and nodes
2. Edge-based graph edges and nodes
3. Packed geometries

Consider the use of identifier parameters in these examples:

---

GetWeightPenaltyForEdgeID(const EdgeID id)  <- edge-based edge

GetUncompressedForwardWeights(const EdgeID id) <- packed geometry

IsLeftHandDriving(const NodeID id) <- edge-based node

GetBearingClass(const NodeID node) <- node-based node

---

This mixing of contexts within the same interface makes it
difficult to understand the relationships and dependencies between
the OSRM datasets.

For 1. and 2. we continue to use the NodeID and EdgeID types, but
change the interface parameter names to identify them as
edge-based or node-based graph properties.

For 3. we define a new type definition, PackedGeometryID.

These changes are to aid with readability. A next step would be
to strongly type these definitions, leveraging the Alias template
already used for OSM identifiers.
2022-08-21 21:37:39 +02:00
..
guidance Enable more clang-tidy checks. (#6270) 2022-06-30 14:32:12 +01:00
alias.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
assert.hpp Remove OSM link debug printing from public class 2018-02-06 11:51:33 +01:00
attributes.hpp adjust testscases for collapse of use lane 2016-09-07 12:17:36 +02:00
bearing.hpp Free functions for guidance intersections analysis 2018-01-05 17:35:11 +01:00
bit_range.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
cast.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
concurrent_id_map.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
conditional_restrictions.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
connectivity_checksum.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
container.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
coordinate_calculation.hpp Fix distance calculation consistency. (#6315) 2022-08-19 22:31:40 +01:00
coordinate.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
deallocating_vector.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
debug.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
dist_table_wrapper.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
dynamic_graph.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
exception_utils.hpp Enable more clang-tidy checks. (#6270) 2022-06-30 14:32:12 +01:00
exception.hpp Enable more clang-tidy checks. (#6270) 2022-06-30 14:32:12 +01:00
exclude_flag.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
filtered_graph.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
filtered_integer_range.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
fingerprint.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
for_each_indexed.hpp Fix for_each_indexed util function 2021-12-22 23:40:06 +00:00
for_each_pair.hpp Takes fn by forwarding ref. in for_each_pair, resolves #4148 2017-06-14 15:17:26 +00:00
for_each_range.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
geojson_debug_logger.hpp normalise angles only if an improvement 2017-10-25 10:17:14 +02:00
geojson_debug_policies.hpp adjust geojson logger to changes in extractor 2017-08-11 12:03:40 +02:00
geojson_debug_policy_toolkit.hpp adjust geojson logger to changes in extractor 2017-08-11 12:03:40 +02:00
geojson_validation.hpp Enable all unit tests (#5248) 2021-10-22 22:10:25 +01:00
graph_traits.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
graph_utils.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
group_by.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
hilbert_value.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
ieee754.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
indexed_data.hpp Enable even more clang-tidy checks (#6273) 2022-07-04 21:46:59 +01:00
integer_range.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
isatty.hpp Conditionally checks std::is_trivially_copyable only if available. (#3327) 2016-11-16 12:07:45 -08:00
json_container.hpp Updating year on all 'Project OSRM' copyrights 2017-10-03 12:03:26 +02:00
json_deep_compare.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
json_renderer.hpp Render floating point numbers to string using Grisu2 algorithmt instead of stdlib to speed up JSON generation. 2018-09-05 14:20:47 -07:00
json_util.hpp Fix compile on OS X 2016-04-05 22:58:32 +02:00
log.hpp Configure Undefined Behaviour Sanitizer (#6290) 2022-08-01 22:40:26 +01:00
lua_util.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
matrix_graph_wrapper.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
meminfo.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
mmap_file.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
mmap_tar.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
msb.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
node_based_graph.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
opening_hours.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
packed_vector.hpp Enable even more clang-tidy checks (#6273) 2022-07-04 21:46:59 +01:00
percent.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
permutation.hpp Add support for multiple via-way restrictions (#5907) 2020-12-20 13:59:57 -08:00
query_heap.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
range_table.hpp Enable more clang-tidy checks. (#6270) 2022-06-30 14:32:12 +01:00
rectangle.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
serialization.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
static_assert.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
static_graph.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
static_rtree.hpp Enable even more clang-tidy checks (#6273) 2022-07-04 21:46:59 +01:00
std_hash.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
string_util.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
string_view.hpp Implements Zero-Copy String Views onto Contiguous Memory, resolves #3265. 2017-01-23 15:22:39 +01:00
timed_histogram.hpp Enable even more clang-tidy checks (#6273) 2022-07-04 21:46:59 +01:00
timezones.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
timing_util.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
to_osm_link.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
trigonometry_table.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
typedefs.hpp Clarify identifier types used in data facade 2022-08-21 21:37:39 +02:00
vector_tile.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
vector_view.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
version.hpp.in Replace fingerprint with semver-based scheme. (#3467) 2017-01-06 13:45:08 -08:00
viewport.hpp Enable even more clang-tidy checks (#6273) 2022-07-04 21:46:59 +01:00
web_mercator.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
xor_fast_hash_storage.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
xor_fast_hash.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00