DDD  1.9.0.20240425101308
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 Thu Apr 25 2024 10:15:16 for DDD by doxygen 1.9.1