Function ripple::math::hash_combine¶
Defined in File math.hpp
Function Documentation¶
-
constexpr auto
ripple::math
::
hash_combine
(uint32_t a, uint32_t b) noexcept -> uint64_t¶ Constexpr hash of two 32 bit unsigned ints.
This uses the cantour pairing formula and is composible, i.e it can be used twice for 3 ints, etc.
- Note
: It is possible that this overflows for large values of
a
andb
, so test for different use cases.- Return
The combined hash of the two inputs.
- Parameters
a
: The first int for the hash.b
: The second input for the hash.