Here you can find the source of murmur2(int value, int salt)
Parameter | Description |
---|---|
value | the value to hash |
salt | the value of the salt |
public static int murmur2(int value, int salt)
//package com.java2s; public class Main { /**//w ww . ja v a 2 s . c o m * The Murmur2 hash function. * @param value the value to hash * @param salt the value of the salt * @return the result of the hash */ public static int murmur2(int value, int salt) { final int M = 0x5bd1e995; final int R = 24; int hash = salt; value *= M; value ^= value >>> R; value *= M; hash *= M; hash ^= value; hash ^= hash >>> 13; hash *= M; hash ^= hash >>> 15; return hash; } }