osrm-backend/include/util
Michael Bell 5d468f2897
Make edge metrics strongly typed (#6421)
This change takes the existing typedefs for weight, duration and
distance, and makes them proper types, using the existing Alias
functionality.

Primarily this is to prevent bugs where the metrics are switched,
but it also adds additional documentation. For example, it now
makes it clear (despite the naming of variables) that most of the
trip algorithm is running on the duration metric.

I've not made any changes to the casts performed between metrics
and numeric types, they now just more explicit.
2022-10-28 15:16:12 +01:00
..
guidance Enable more clang-tidy checks. (#6270) 2022-06-30 14:32:12 +01:00
alias.hpp Make edge metrics strongly typed (#6421) 2022-10-28 15:16:12 +01: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
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 Remove redundant nullptr check. (#6326) 2022-08-25 00:01:56 +02:00
debug.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
dist_table_wrapper.hpp Make edge metrics strongly typed (#6421) 2022-10-28 15:16:12 +01: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 Refactor CMake code related to compiler warnings, enable some additional warnings (#6355) 2022-09-30 11:42:36 +02:00
exclude_flag.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
filtered_graph.hpp Update CI to use clang-tidy 14 (#6353) 2022-08-31 23:39:47 +02:00
filtered_integer_range.hpp Refactor CMake code related to compiler warnings, enable some additional warnings (#6355) 2022-09-30 11:42:36 +02: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
indexed_data.hpp Enable even more clang-tidy checks (#6273) 2022-07-04 21:46:59 +01:00
integer_range.hpp Refactor CMake code related to compiler warnings, enable some additional warnings (#6355) 2022-09-30 11:42:36 +02: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 Improve performance of JSON rendering (#6380) 2022-10-03 21:43:51 +02: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 Make edge metrics strongly typed (#6421) 2022-10-28 15:16:12 +01:00
opening_hours.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
packed_vector.hpp Make edge metrics strongly typed (#6421) 2022-10-28 15:16:12 +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 Refactor CMake code related to compiler warnings, enable some additional warnings (#6355) 2022-09-30 11:42:36 +02: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 Refactor CMake code related to compiler warnings, enable some additional warnings (#6355) 2022-09-30 11:42:36 +02:00
static_rtree.hpp Support snapping to multiple ways at an input location (#5953) 2022-08-27 11:36:20 +01:00
std_hash.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
string_util.hpp Improve performance of JSON rendering (#6380) 2022-10-03 21:43:51 +02: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 Make edge metrics strongly typed (#6421) 2022-10-28 15:16:12 +01: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