Hashing function

P

Pat

I want to look for some one-to-one hashing function.

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

osmium

Pat said:
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.
 
I

Ivan Vecerina

Pat said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

64-bit hashing function 30
STL Map uses hashing? 11
Registration Form 7
hashing strings to integers for sqlite3 keys 22
Universal hashing 5
hashing function 6
Which hashing function to use? 11
Hashing long strings... 8

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top