hash0 overloads
Synopses
Declared in <bdlb_hashutil.h>
Same as the preceding overload for the specified key type.
static
unsigned int
hash0(
bsls::Types::Int64 key,
int modulus);
Same as the preceding overload for the specified key type.
static
unsigned int
hash0(
bsls::Types::Uint64 key,
int modulus);
Return an unsigned integer hash value in the range from zero to one less than the specified modulus corresponding to the specified key. The behavior is undefined unless 0 < modulus < 2ˆ31. Note that modulus is expected to be a prime not close to an integral power of 2. Also note that specifying a modulus of 1 will cause 0 to be returned for every value.
static
unsigned int
hash0(
char key,
int modulus);
Same as the preceding overload for the specified key type.
static
unsigned int
hash0(
double key,
int modulus);
Same as the preceding overload for the specified key type.
static
unsigned int
hash0(
float key,
int modulus);
Same as the preceding overload for the specified key type.
static
unsigned int
hash0(
int key,
int modulus);
Same as the preceding overload for the specified key type.
static
unsigned int
hash0(
long key,
int modulus);
Same as the preceding overload for the specified key type.
static
unsigned int
hash0(
short key,
int modulus);
Same as the preceding overload for the specified key type.
static
unsigned int
hash0(
signed char key,
int modulus);
Same as the preceding overload for the specified key type.
static
unsigned int
hash0(
unsigned char key,
int modulus);
Same as the preceding overload for the specified key type.
static
unsigned int
hash0(
unsigned int key,
int modulus);
Same as the preceding overload for the specified key type.
static
unsigned int
hash0(
unsigned long key,
int modulus);
Same as the preceding overload for the specified key type.
static
unsigned int
hash0(
unsigned short key,
int modulus);
Return a pseudo‐random unsigned integer in the range from zero to one less than the specified modulus corresponding to the specified null‐terminated string. The behavior is undefined unless 0 < modulus < 2ˆ31. Note that modulus is expected to be a prime not close to an integral power of 2. Also note that specifying a modulus of 1 will cause 0 to be returned for every string.
static
unsigned int
hash0(
char const* string,
int modulus);
Same as the preceding overload for the specified pointer key.
static
unsigned int
hash0(
void const* key,
int modulus);
Return a pseudo‐random unsigned integer in the range from zero to one less than the specified modulus corresponding to the specified string having the specified stringLength. string need not be null‐terminated and may contain embedded null characters. The behavior is undefined unless 0 <= stringLength and 0 < modulus < 2ˆ31. Note that modulus is expected to be a prime not close to an integral power of 2. Also note that specifying a modulus of 1 will cause 0 to be returned for every string.
static
unsigned int
hash0(
char const* string,
int stringLength,
int modulus);
Created with MrDocs