DDD 1.9.0.20250409152518
Functions
Hashing functions

Functions

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

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 Wed Apr 9 2025 15:27:42 for DDD by doxygen 1.9.8