#include <sstream>
#include <SimData/HashUtility.h>
Defines | |
| #define | mix(a, b, c) |
Functions | |
| uint32 | newhash (register uint8 const *k, uint32 length, uint32 initval) |
| A character string to 32-bit hash function. | |
| uint32 | newhash4_cstring (std::string const &str) |
| Generate a 32-bit hash from a string. | |
| HashT | newhasht_cstring (std::string const &str) |
| Generate a 64-bit hash (HashT) from a string. | |
| std::ostream & | operator<< (std::ostream &o, const hasht &x) |
The hash functions coded here are from "Hash Functions for Hash Table Lookup" by Robert J. Jenokins Jr., and are Public Domain. See <http://burtleburtle.net/bob/hash/evahash.html>
|
|
Value: { \
a=a-b; a=a-c; a=a^(c>>13); \
b=b-c; b=b-a; b=b^(a<<8); \
c=c-a; c=c-b; c=c^(b>>13); \
a=a-b; a=a-c; a=a^(c>>12); \
b=b-c; b=b-a; b=b^(a<<16); \
c=c-a; c=c-b; c=c^(b>>5); \
a=a-b; a=a-c; a=a^(c>>3); \
b=b-c; b=b-a; b=b^(a<<10); \
c=c-a; c=c-b; c=c^(b>>15); \
} |
|
||||||||||||||||
|
A character string to 32-bit hash function.
|
|
|
Generate a 32-bit hash from a string.
|
|
|
Generate a 64-bit hash (HashT) from a string.
|
|
||||||||||||
|
|
|
SimData version pre-0.4.0. For more information on SimData, visit the SimData Homepage. Generated on Tue Oct 14 12:06:39 2003, using Doxygen 1.2.18. |