Friday, August 16, 2013

C++ hash function, how is the original haser i.e. hash implemented

C++ hash function, how is the original haser i.e. hash implemented

I am new to the hashing in general and also to the STL world and saw the
new std::unrdered_set and the SGI :hash_set,both of which uses the hasher
hash. I understand to get a good load factor , you might need to write
your own hashfunction, and I have been able to write one.
However, I am trying to go deep into , how the original default
has_functions are written. My question is : 1) How is the original default
HashFcn written ; more concretely how is the hash generated? Is it based
on some pseudo random number. Can anyone point me to some header file (I
am a bit lost with the documentation), where I can look up ; how the
hasher hash is implemented.
2)How does it guarantee that each time , you will be able to get the same
key?
Please, let me know if I can make my questions clearer any way?

No comments:

Post a Comment