DDD  1.9.0.20240826145154
Functions
Hashing functions

Functions

size_t ddd::wang32_hash (size_t key)
 Thomas Wang's 32 bit hash function. More...
 
uint32_t ddd::int32_hash (uint32_t a)
 Another of Wang's fast hash with a magic number. More...
 
size_t ddd::knuth32_hash (size_t key)
 Knuth's Multiplicative hash function. More...
 

Detailed Description

Function Documentation

◆ int32_hash()

uint32_t ddd::int32_hash ( uint32_t  a)
inline

Another of Wang's fast hash with a magic number.

good for (sequence of) integers

Referenced by _GDDD::hash(), GDDD::hash(), _setVarConst::hash(), and _incVar::hash().

◆ knuth32_hash()

size_t ddd::knuth32_hash ( size_t  key)
inline

Knuth's Multiplicative hash function.

This function is suitable for hashing values whose high order bits do not vary much (ex. addresses of memory objects). Prefer spot::wang32_hash() otherwise. http://www.concentric.net/~Ttwang/tech/addrhash.htm

Referenced by GHom::hash(), MLHom::hash(), MLShom::hash(), GSDD::hash(), and GShom::hash().

◆ wang32_hash()

size_t ddd::wang32_hash ( size_t  key)
inline

Please comment this page and report errors about it on the RefDocComments page.
Generated on Mon Aug 26 2024 14:54:00 for DDD by doxygen 1.9.1