public static long murmur3 ( final BitVector bv , final long seed ) { long h1 = 0x9368e53c2f6af274 L ^ seed ; long h2 = 0x586dcd208f7cd3fd L ^ seed ; long c1 = 0x87c37b91114253d5 L ; long c2 = 0x4cf5ad432745937f L ; long from = 0 ; final long length = bv . length ( ) ; long k1 , k2 ; while ( length - from >= Long . SIZE * 2 ) { k1 = bv . getLong ( from , from + Long . SIZE ) ; k2 = bv . getLong ( from + Long . SIZE , from += 2 * Long . SIZE ) ; k1 *= c1 ; k1 = Long . rotateLeft ( k1 , 23 ) ; k1 *= c2 ; h1 ^= k1 ; h1 += h2 ; h2 = Long . rotateLeft ( h2 , 41 ) ; k2 *= c2 ; k2 = Long . rotateLeft ( k2 , 23 ) ; k2 *= c1 ; h2 ^= k2 ; h2 += h1 ; h1 = h1 * 3 + 0x52dce729 ; h2 = h2 * 3 + 0x38495ab5 ; c1 = c1 * 5 + 0x7b7d159c ; c2 = c2 * 5 + 0x6bce6396 ; } if ( length > from ) { if ( length - from > Long . SIZE ) { k1 = bv . getLong ( from , from + Long . SIZE ) ; k2 = bv . getLong ( from + Long . SIZE , length ) ; } else { k1 = bv . getLong ( from , length ) ; k2 = 0 ; } k1 *= c1 ; k1 = Long . rotateLeft ( k1 , 23 ) ; k1 *= c2 ; h1 ^= k1 ; h1 += h2 ; h2 = Long . rotateLeft ( h2 , 41 ) ; k2 *= c2 ; k2 = Long . rotateLeft ( k2 , 23 ) ; k2 *= c1 ; h2 ^= k2 ; h2 += h1 ; h1 = h1 * 3 + 0x52dce729 ; h2 = h2 * 3 + 0x38495ab5 ; c1 = c1 * 5 + 0x7b7d159c ; c2 = c2 * 5 + 0x6bce6396 ; } h2 ^= length ; h1 += h2 ; h2 += h1 ; h1 = finalizeMurmur3 ( h1 ) ; h2 = finalizeMurmur3 ( h2 ) ; return h1 + h2 ; }
MurmurHash3 64 - bit