From: Ken Burtch <kburtch@sympatico.ca>
Subject: Re: hashing
Date: Mon, 15 Apr 2002 11:32:55 -0400
Date: 2002-04-15T11:32:55-04:00 [thread overview]
Message-ID: <3CBAF2A7.7D819DD8@sympatico.ca> (raw)
In-Reply-To: 604t8.3744$tZ1.983158@news2-win.server.ntlworld.com
I believe there's a simple string hash value generator (HashOf) included
in the strings package of my drawtools suite
http://www.pegasoft.ca
Ken B.
"chris.danx" wrote:
>
> "Steven Deller" <deller@smsail.com> wrote in message
> news:mailman.1018477621.31315.comp.lang.ada@ada.eu.org...
> > > Subject: hashing
> > > Hi,
> > >
> > > Does anyone have a good hash function for strings (length is
> > > arbitary, number of buckets is determined when package is
>
> I'll maybe look into that (if it doesn't involve reverse engineering C). I
> found one that may suffice for the purposes of the exercise, it's nothing
> fancy but it should work.
>
> Sum all ascii vals of chars in string, then take modulo bucket size.
>
> > Other than that, I'd try one of the numerous ISO-defined hash functions,
> > such as CRC-32, etc.
>
> ISO define hash functions?
>
> > I did a web search on "hash function algorithms" and came up with
> > NUMEROUS interesting sites.
>
> oops wrong search string, "hash function strings". Got loads of stuff in
> code, but code is not as useful. Algorithm/function descriptions
> (mathematics included) are better than code IMO, since they express
> algorithms functions in a programming language independant manner. When we
> were learning about bstrees they gave us Ada code which made no sense at the
> time due to poor descriptions of the algorithms and considerations involved.
> However when we learned how to do bstrees in Haskell, just before easter
> break it made perfect sense since the lecturer took the time to describe the
> algorithms. The code was secondary to the algorithm.
>
> [snip]
>
> > > p.p.s. should performance/complexity information be included?
> > > I seem to recall a conversation on this a while back, but
> > > can't remember if ppl thought it was a good idea.
> >
> > Complexity information always raises its head at some point. Best to
> > include it.
>
> it does makes sense to include it and it'll definitely go in the gmgpl
> version... But does complexity information come under the header of an
> implementation detail? i don't think it does but if it does and I include
> it in the spec, my tutor might disagree and I'll get penalised. This is one
> of my grumps about uni, not knowing what they want with things. In first
> year, you'd get penalised for *not* putting pointless comments in.
>
> Ignore that, I'm probably worrying about nothing!!!
>
> Thanks,
> Chris
--
Ken O. Burtch: http://www.pegasoft.ca : Pegasoft
System Manager in a Box / Business Shell : R.R.#1
Bio: 36;Bsc,UI,Lang,Games;Toons,Elves,SF,Pizza;Xian : Jordan Station,
ON
``````````````````````````````````````````````````````` Canada L0R 1S0
next prev parent reply other threads:[~2002-04-15 15:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-10 21:31 hashing chris.danx
2002-04-10 21:24 ` hashing Steven Deller
2002-04-10 22:41 ` hashing Nick Williams
2002-04-10 23:36 ` hashing chris.danx
2002-04-11 14:18 ` hashing joevl
2002-04-15 15:32 ` Ken Burtch [this message]
2002-04-11 23:18 ` hashing(HATs. A more efficient algorithm?) Wannabe h4x0r
2002-04-11 23:29 ` chris.danx
2002-04-12 7:24 ` Wannabe h4x0r
2002-04-12 15:00 ` Chad R. Meiners
2002-04-12 17:22 ` tmoran
2002-04-10 21:56 ` hashing Chad R. Meiners
2002-04-10 23:43 ` hashing Ted Dennison
2002-04-11 16:12 ` hashing Georg Bauhaus
2002-04-11 22:36 ` hashing Simon Wright
2002-05-03 10:16 ` hashing Antonio Duran
2002-05-05 13:55 ` hashing Robert Dewar
2002-05-06 20:42 ` hashing Antonio Duran
2002-05-06 23:36 ` hashing Jeffrey Carter
-- strict thread matches above, loose matches on Subject: below --
2002-04-10 22:00 hashing Beard, Frank [Contractor]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox