Reply
Tue 19 Oct, 2004 06:28 pm
So I'm auditing a class in scheme, right, and one of the assignments (that I don't have to do, since I'm auditing) is to make a hash table in scheme for the purpose of calculating probabilities of bigrams and so forth. Now. I understand the basic concept behind a hash table, but I am not entirely sure how one would make one so that it was efficient (compared to an array of pointers, or something like that). I want to play around with it in C++, but I'm not sure how I'd go about building one, and it isn't mentioned in the books I have. Can one of you nerds give me some pointers?
A few pointers...
*p, *g ...
haha
Anyways, my first thought of examples is check out some source code. I don't think c++ has any built in hashing anything, but I know Java does. If you haven't worked with Java before, don't worry. The syntax is very similar to c++. Check out the
docs for more info (I think there are several classes that implement hashing that have the word "hash" in their name...HashMap, HashSet, Hashtable...)