Re: RE: Hash Table Lookup

new topic     » goto parent     » topic index » view thread      » older message » newer message

6/03/2002 3:21:29 PM, "C. K. Lester" <cklester at yahoo.com> wrote:

>
>Derek Parnell wrote:
>> Using Euman's earlier code...
>
>You mean his earlier earlier code or his later earlier code? :)
>
>>     lWord = upper("buffalo")
>>     hashed = EumsHash(lWord)
>>     len_text = length(lWord)
>>     k = lData[1] - 64
>
>It gets stuck here for me... lData hasn't been defined.

Ooops! That's what I get for cut&pasting without double checking!
That "lData" should be "lWord". What it is trying to do is get the first
character of the word and
convert it to an index. It does this by subtracting 64 which is the ascii value
of 'A' less one.

>I'm trying to understand his code posted under "EumsHash( ) Update". 
>Maybe he took out the lData variable from that version...?
>
>Derek, I noticed you had a hash library in the EUPHORIA archives. Are 
>you using that code in your program?

Thank you for noticing. I'm not using that library because that is a general
purpose hashing library
and for the competition code I'm using a highly optimised hashing algorithm. The
one I'm using is
nothing like Euman's either! Also, I'm not hashing the words either, but
something else.

The one in the archives is better suited to complex tasks such as symbol table
management for
compilers etc... On the other hand, maybe I should go back and see if I can
optimise it some more
blink

---------
Cheers,
Derek Parnell 
ICQ# 7647806

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu