From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,XPRIO, XPRIO_SHORT_SUBJ autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,eec376a334ad59ed,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-10 14:31:42 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.vmunix.org!peernews!peer.cwci.net!news5-gui.server.ntli.net!ntli.net!news8-gui.server.ntli.net.POSTED!53ab2750!not-for-mail From: "chris.danx" Newsgroups: comp.lang.ada Subject: hashing X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2462.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000 Message-ID: <1b2t8.507$na.19833@news8-gui.server.ntli.net> Date: Wed, 10 Apr 2002 22:31:28 +0100 NNTP-Posting-Host: 62.252.136.214 X-Complaints-To: abuse@ntlworld.com X-Trace: news8-gui.server.ntli.net 1018474301 62.252.136.214 (Wed, 10 Apr 2002 22:31:41 BST) NNTP-Posting-Date: Wed, 10 Apr 2002 22:31:41 BST Organization: ntlworld News Service Xref: archiver1.google.com comp.lang.ada:22329 Date: 2002-04-10T22:31:28+01:00 List-Id: Hi, Does anyone have a good hash function for strings (length is arbitary, number of buckets is determined when package is instantiated and collisions are handled with chaining)? I'm new to writing hash tables and functions (used them in libs, but this has to be all my own work!), and have chosen this technique to implement in an assignment -- had enough linked lists, and want to expand my horizons. I'm searching for a function just now, so this isn't laziness just wanted to utilise another resource (your brains) in case nothing turns up. After the assignment submission in a few weeks, I'll tidy up the sources for all the useful adts I've written this term and GMGPL them (lists (singly, doubly), hash tables, and whatever else comes up) if ppl express an interest (all adts are generic so far). Thanks, Chris p.s. does anyone have any uses for circular lists? Tom Swans Tp5.5 book mentions them, what are they used for? Just curious... 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.