I recently decided to implement code for a Random matrix with values determined by prn generated from the index values. However, I quickly realized I dont know of a good hash function for 1 /2 word sequences. Does anyone know of a good hash function that produces uniform random-ish output from a linearly increasing integer value?
I thought of knuth's, just multiplying by a large prime - but it would preserve divisibilities, and since this is a matrix - would result in bands of similar values.
I found this post from Alex Smola echoing the same idea, but he doesn't suggest any hash function to use.
http://blog.smola.org/post/14345795830/random-numbers-in-constant-storage
[link][3 comments]