Re: Suggestions for double-hashing scheme
- From: Tim Rentsch <txr@xxxxxxxxxxxxxxxxxxx>
- Date: 21 Jun 2005 09:50:04 -0700
Clint Olsen <clint@xxxxxxxxx> writes:
> On 2005-06-12, Tim Rentsch <txr@xxxxxxxxxxxxxxxxxxx> wrote:
> > The algorithm doesn't need recursion or a stack; just plain iteration
> > can work. Here's an example, assuming pointers are the values being
> > saved -- a null pointer with a probe count of zero is an EMPTY slot, a
> > null pointer with a probe count greater than zero is a DELETED slot.
>
> Ahh, ok, so you're using the copy-out method as I described as one of my
> workarounds. If we wanted to do an in-place move in the hash, then it's
> more work as I described. I wasn't planning on using references (void
> pointers) since I would like to have arbitrary-sized objects occupying the
> hash. It's the way I designed my array library, so I wanted to be as
> consistent as possible.
Sorry for not responding to this earlier.
The items that are being moved are the items in the hash table
itself, which are of fixed size (they are in an array, after all).
If you want to hash variable-sized data, they need to be stored
separately in any case. The hash table array would store, eg,
a pointer to the memory holding the element being hashed.
Make sense?
.
- Follow-Ups:
- Re: Suggestions for double-hashing scheme
- From: Clint Olsen
- Re: Suggestions for double-hashing scheme
- References:
- Re: Suggestions for double-hashing scheme
- From: Clint Olsen
- Re: Suggestions for double-hashing scheme
- From: Tim Rentsch
- Re: Suggestions for double-hashing scheme
- From: Clint Olsen
- Re: Suggestions for double-hashing scheme
- From: Tim Rentsch
- Re: Suggestions for double-hashing scheme
- From: Clint Olsen
- Re: Suggestions for double-hashing scheme
- From: Tim Rentsch
- Re: Suggestions for double-hashing scheme
- From: Clint Olsen
- Re: Suggestions for double-hashing scheme
- Prev by Date: Re: puzzle
- Next by Date: Re: puzzle
- Previous by thread: Re: Suggestions for double-hashing scheme
- Next by thread: Re: Suggestions for double-hashing scheme
- Index(es):
Relevant Pages
|