954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Hashtables

I have heard a lot of talk about hashtables from time to time. They are supposed to be very cool ways of storing data where the index you use to look up the data is somehow the data itself.

But hashtables are not part of the C++ standard template library... I think. So does anyone have any tips on how to write a hashtable?

complete
Junior Poster
153 posts since Dec 2005
Reputation Points: 17
Solved Threads: 0
 
Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 

There are hash_map and hash_set containers in Visual C++ (based on SGI implementation).
See also:
http://code.google.com/p/google-sparsehash/
(yet another hash containers templates, downloadable and well-documented).
Look at a rather good hash function for raw bytes data (this link turned up just at the right moment;)):
http://www.myserverproject.net/doc/source/hash__map_8cpp.html
The last (but not least) link (with tons of references):
http://en.wikipedia.org/wiki/Hash_table

ArkM
Postaholic
2,001 posts since Jul 2008
Reputation Points: 1,234
Solved Threads: 348
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You