Re: Best way to hash a set of integers?



Logan Shaw said:

Digital Puer wrote:
Ben Pfaff wrote:
"Digital Puer" <digital_puer@xxxxxxxxxxx> writes:

However, I'm still looking for info on how to best hash a *set*
of integers;

Can you
tell us anything about the sets?

I guess I'm looking for a way to compute what could be
called a multi-dimensional key. Suppose I have three integers
representing age, height (in cm), and weight (in lbs). I want
to somehow combine those together into a single key that will be
my index into a hash table (prior to doing mod hash_table_size).

That's not a set!

Yes it is. The word "set" has more than one meaning, and "bunch" is
certainly one of them.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
.



Relevant Pages