By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,819 Members | 1,185 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,819 IT Pros & Developers. It's quick & easy.

Hashing function

P: n/a
Pat
I want to look for some one-to-one hashing function.

In C++, any one-to-one hashing function?

Jul 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Pat writes:
I want to look for some one-to-one hashing function.

In C++, any one-to-one hashing function?


I assume by one-to-one you mean perfect hashing. There is no such thing in
the standard libraries, I would search google to see what you can dig up.
Jul 22 '05 #2

P: n/a
"Pat" <Pa*@Pat.com> wrote in message news:40**********@rain.i-cable.com...
I want to look for some one-to-one hashing function.

In C++, any one-to-one hashing function?

Assuming you are looking for a 'perfect hash' function:

There is no such thing as a general-purpose perfect hash. A hash
function can only be perfect for a specific set of inputs.

There are C/C++ tools, however, that can automatically generate
a perfect hash function for a specific list of input strings.
For example: http://www.gnu.org/software/gperf/gperf.html
hth
--
http://ivan.vecerina.com/contact/?subject=NG_POST <- e-mail contact form
Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.