On Jan 21, 3:45 pm, "Rod Pemberton" <do_not_h...@noavailemail.cmm>
wrote:
> "BruceMcF" <
agil...@netscape.net> wrote in message
> news:6966483a-9850-4392...@h3g2000yqe.googlegroups.com...> On Jan 20, 5:52 am, "Rod Pemberton" <do_not_h...@noavailemail.cmm>
> > wrote:
> ...
> > If you know where the set of hash buckets is located,
> > you do not need to link the hash buckets together, you
> > can just look in each hash bucket, one after the other.
> How do you get from one hash bucket to another? I.e., represented by
> your phrase "just look in each hash bucket, one after the other".
Instead of *fetching* the next address from a *link* field in the
item, you may, for example, increment the data bucket address and
compare the result to the end of the vector of hash buckets.
> The functionality to move from bucket to bucket represents a link,
> which is what I said previously ...
If you are redefining words from their normal meaning to some
idiosyncratic meaning, then say so up front ... the "functionality to
move from bucket to bucket" does not "represent a link". It performs
part of the same *function* as a link (though often only part, since
there may be a linked list of all hash collisions in a given hash
bucket) ... but it does not do so by *using a link address*. It does
so by some other means.
The point of the traverse-wordlist operations (plural, since as we've
seen there are a family of them both already implementation and
conceivable) is that the mechanics of traversing the wordlist does not
have to be first mapped to match the mechanics of traversing a linked
list. Instead, the direct mechanics of traversing the wordlist however
it is implemented is used.
> It could be simply summing an address of a fixed bucket size from the
> starting address of the buckets.
But then its no longer a link, its a *different* way to step through ~
a way to step through that depends on a different set of information
than a *linked* list. For example, you can use a do-loop to step
through a vector of hash buckets, which is an option that hiding the
actual hash buckets behind an abstraction that pretends that its a
linked list will hide.
> However, that functionality - the functionality to move to the next
> bucket - is present and codified.
Yes, and the functionality to move to the next bucket is provided by
something *other than* a link which you are mapping to a set of linked
list operations.
> If you had understood what I wrote, you wouldn't have just
> reiterated that.
> > The rest snipped unread as if you think its impossible to
> > traverse a set of hash buckets, [...]
> I said no such thing. You simply failed to comprehend what I wrote.
You said if there is no link, there should be a no-op. Now you clarify
that when you said if there is no link, you did not mean what the
words would seem to say, that when there is no *actual* link, but
rather by link you meant something more general ~ neither a link nor
anything else which can be used to traverse the information.
The link for the hash bucket is a double ~ the index into the hash
bucket vector and the address for the item>next-item operation in the
hash collision change. Emulating that with a set of operators for a
linked list requires hiding state ~ likely the hash bucket vector
index ~ and that means that operations which *are* valid for a real
linked list will not be valid for the emulated linked list.