Java Utililty Methods Hash Calculate

List of utility methods to do Hash Calculate

Description

The list of methods to do Hash Calculate are organized into topic(s).

Method

inthash(int i, int j)
Combines two integers into a hash code.
return (i << 4) ^ j;
inthash(int k)
hash
k = (k ^ 61) ^ (k >>> 16);
k = k + (k << 3);
k = k ^ (k >>> 4);
k = k * 0x27d4eb2d; 
k = k ^ (k >>> 15);
return k;
inthash(int k)
hash
k ^= k >>> 16;
k *= 0x85ebca6b;
k ^= k >>> 13;
k *= 0xc2b2ae35;
k ^= k >>> 16;
return k;
inthash(int key)
Get the hash value for the given key.
int hash = key;
hash = ((hash >>> 16) ^ hash) * 0x45d9f3b;
hash = ((hash >>> 16) ^ hash) * 0x45d9f3b;
hash = (hash >>> 16) ^ hash;
return hash;
inthash(int n)
hash
int hash = 5381;
hash = ((hash << 5) + hash) + (n & 0xFF); 
hash = ((hash << 5) + hash) + ((n >> 8) & 0xFF);
hash = ((hash << 5) + hash) + ((n >> 16) & 0xFF);
hash = ((hash << 5) + hash) + ((n >> 24) & 0xFF);
hash &= 0x7FFFFFFF;
return hash;
inthash(int p_188208_0_)
hash
p_188208_0_ = p_188208_0_ ^ p_188208_0_ >>> 16;
p_188208_0_ = p_188208_0_ * -2048144789;
p_188208_0_ = p_188208_0_ ^ p_188208_0_ >>> 13;
p_188208_0_ = p_188208_0_ * -1028477387;
p_188208_0_ = p_188208_0_ ^ p_188208_0_ >>> 16;
return p_188208_0_;
inthash(int seed, boolean value)
hash
return seed * 11 + (value ? 1 : 0);
inthash(int seed, int i)
hash
return seed * MULTI + i;
inthash(int seed, int toHash)
Returns a new hash code depending on the seed and toHash.
return first(seed) + toHash;
inthash(int seed, int val)
hash
return (seed * 65050 + val) % 2044508069;