tahg

Untitled

Oct 25th, 2017
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. int[] hash = new int[] { 0x9E3779B9, 0x01234567, 0x89ABCDEF, 0x243F6A88, 0xB7E15162 };
  2.  
  3. for (int i : intArray) {
  4. long l = (long) hash[0] * hash[0] + i;
  5. hash[0] = (int) l;
  6. hash[1] += l;
  7. hash[2] += (l >> 32);
  8. hash[3] ^= l;
  9. hash[4] ^= (l >> 32);
  10. }
Add Comment
Please, Sign In to add comment