Needs to know hashing functions used for array indexing

View: New views
2 Messages — Rating Filter:   Alert me  

Needs to know hashing functions used for array indexing

by Irfan Ahmed :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I wanna know the hash functions that I can used for indexing arrays.

Are there hash functions that can generate values lie between any range. e.g. if array size is n, the value hash function will generate should lie between 0 to n.

which language

by Nicholas Jordan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I use Java, which has libraries to do what you are posting. STL may have routines to do this, I do not know. For any other language I have no information. In general, an array when used for hashing access is an array of constant size. Sooner or later Captain Hardcode resists recode and so what I did was provide my effort great assistance by considering Tree Map, which I now use along with Java Hashtable as almost interchangeable storage containers only using hash based array indexing when I can oneday figure how to map from the array containing the keys to the array containing the data.
LightInTheBox - Buy quality products at wholesale price!