Phase 9: More Fun with Hash Tables (Optional)
This part of the assignment is optional. Doing some aspect of this part will add up to three bonus points to your overall Homework 8 score; as always, the reason to do the optional is not to get points, but to learn more!
If you decide to do this part, add a file named Fun.md to your repository and be sure to describe what you did and how to run it in that file. If you write programs of your own (like the ones on the word-generator page), put them, and anything they produce, in a folder named Experiments in your repository; the autograder leaves that folder alone, and Fun.md should say how to build and run them. You can also add any additional test cases you created to hashmultiset-test.cpp, but, when submitting, you should comment out any tests that would fail on the unmodified version of your HashMultiset<T> class template.
There are two categories of extra things you can try: modifying the hash table itself, or doing more with your word generator.
Here are some ideas for extra things you could try for modifying the hash table itself:
- Adding an Iterator: Implement an iterator for your
HashMultiset<T>class template so that users can iterate through all the keys in the multiset. - Implementing
erase: Implement anerasemember function for yourHashMultiset<T>class template that removes a key from the multiset. - Try Open Addressing: Create a new class template
OAHashMultiset<T>that implements a hash table using open addressing (with linear probing) instead of separate chaining.
Here are some ideas for doing more with your word generator (they're all on one page):
- Blends: Train on two lists at once, and work out where and why invented words cross from one to the other.
- Between Girls' and Boys' Names: Is an androgynous name halfway between? Train three models and find out.
- Is It Really New?: Check invented words against a big dictionary, with another
HashMultiset. - Start From a Prefix: Invent words that begin a particular way, backing off to shorter contexts when you have to.
- Temperature: Make the model play it safe, or make it adventurous.
- Words Made of Words: Generate text a word at a time, as in The Practice of Programming.
- Write a Vollantry: Write a paragraph of a story with words your models invented.
For most pairs, picking just one of these options is plenty to feel like you've done something extra. But if you're feeling ambitious, you can try more than one!
Meh. I'm not doing any of this optional stuff.
Oh, come on! This is where the fun is!
It's a chance to learn MORE!
Hay! I'm getting an odd sense of déjà vu…
(When logged in, completion status appears here.)