Re: Best way to hash a set of integers?
- From: Richard Heathfield <invalid@xxxxxxxxxxxxxxx>
- Date: Tue, 19 Sep 2006 23:46:11 +0000
Digital Puer said:
<snip>
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).
What a bizarre mix of units! :-)
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).
Have you tried simply adding the numbers? What sort of distribution do you
get?
--
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)
.
- Follow-Ups:
- Re: Best way to hash a set of integers?
- From: Richard Harter
- Re: Best way to hash a set of integers?
- References:
- Best way to hash a set of integers?
- From: Digital Puer
- Re: Best way to hash a set of integers?
- From: toby
- Re: Best way to hash a set of integers?
- From: Digital Puer
- Re: Best way to hash a set of integers?
- From: Ben Pfaff
- Re: Best way to hash a set of integers?
- From: Digital Puer
- Best way to hash a set of integers?
- Prev by Date: Re: Best way to hash a set of integers?
- Next by Date: Re: Best way to hash a set of integers?
- Previous by thread: Re: Best way to hash a set of integers?
- Next by thread: Re: Best way to hash a set of integers?
- Index(es):
Relevant Pages
|