[Mono-list] Delving in to System.Collections.Hashtable
John Barnette
jbarn@httcb.net
Thu, 12 Jul 2001 15:12:00 -0600
Hey kids,
I could use the wisdom of somebody with a real CS education (or equivalent
mucking about) on this one. I've been playing with various hashtable
implementations in C#, and I'm puzzling over the MS implementor docs for
Hashtable. Based on a couple of comments in the docs I slotted the MS
Hashtable implementation as a separate-chaining hashtable, but now I'm not
absolutely certain.
SCHT, of course, is YA collision avoidance approach, so that
Bucket 0: tom
Bucket 1: dick -> harry
Bucket 2: marge -> homer -> lisa
entries with keys that hash identically are stored as a linked list. Java's
java.util.HashMap is a pretty standard SCHT, for example.
When I look at System.Collections.IDictionaryEntry, though, I don't see a
'Next' attribute or anything else that would allow a linked list in this
fashion. Plus, I don't think structs in C# are allowed to have data members
of the same type.
Any wisdom? I'm perfectly happy with either constructive help or a "piss
off and let people with CS experience implement this." ;-)
~ j.