General purpose hash code functions. More...
#include <kanzi/core/legacy/util/collection/kzc_collection_value.hpp>
#include <kanzi/core/legacy/util/string/kzc_string.hpp>
#include <kanzi/core/legacy/kzs_types.hpp>
Macros | |
#define | KZ_KNUTH_HASH_MUL |
Knuth's hash multiplier for 32-bit constants. More... | |
#define | KZ_FNV1_HASH_SEED |
When defined, use Knuth's hash over FNV hash. More... | |
#define | KZ_FNV1_HASH_PRIME |
FNV-1 hash prime. More... | |
Typedefs | |
typedef kzU32(* | KzcHashFunction) (const void *object) |
Custom hash function definition. More... | |
Functions | |
KZ_INLINE kzU32 | kzcHashCodeFromUint (kzUint value) |
Hash code function for unsigned integers. More... | |
KZ_INLINE kzU32 | kzcHashCodeFromFloat (kzFloat value) |
Hash code function for floats. More... | |
KZ_INLINE kzU32 | kzcHashCodeFromInt (kzInt value) |
Hash code function for signed integers. More... | |
KZ_INLINE kzU32 | kzcHashCodeFromPointerUint (kzUint value) |
Hash code function for pointers that are already casted to uints. More... | |
KZ_INLINE kzU32 | kzcHashCodeFromPointer (const void *value) |
Hash code function for pointers. More... | |
KZ_INLINE kzU32 | kzcHashCodeFromString (kzString value) |
Hash code function for strings. More... | |
General purpose hash code functions.
Hash code and comparator is related such that for two objects a and b if compare(a,b) == 0 then hashCode(a) == hashCode(b).
Copyright 2008-2017 by Rightware. All rights reserved.
#define KZ_KNUTH_HASH_MUL |
Knuth's hash multiplier for 32-bit constants.
#define KZ_FNV1_HASH_SEED |
When defined, use Knuth's hash over FNV hash.
FNV-1 hash seed.
#define KZ_FNV1_HASH_PRIME |
FNV-1 hash prime.
typedef kzU32(* KzcHashFunction) (const void *object) |
Custom hash function definition.
Hash code function for pointers that are already casted to uints.