List of utility methods to do Hash Code Calculate
int | hashBitmap(Bitmap bitmap) hash Bitmap int hash_result = 0; int w = bitmap.getWidth(); int h = bitmap.getHeight(); hash_result = (hash_result << 7) ^ h; hash_result = (hash_result << 7) ^ w; for (int pixel = 0; pixel < 20; ++pixel) { int x = (pixel * 50) % w; int y = (pixel * 100) % h; ... |
int | hashCode(T a) hash Code return (a == null) ? 0 : a.hashCode();
|
int | hashCode(T a, T b) hash Code int h = hashCode(a); int x = (b == null) ? 0 : b.hashCode(); h = ((h << 5) - h) ^ x; return h; |
int | hashCode(T a, T b, T c) hash Code int h = hashCode(a, b); int x = (c == null) ? 0 : c.hashCode(); h = ((h << 5) - h) ^ x; return h; |
int | hashCode(T a, T b, T c, T d) hash Code int h = hashCode(a, b, c); int x = (d == null) ? 0 : d.hashCode(); h = ((h << 5) - h) ^ x; return h; |
int | hashCode(T[] array) Hash every element uniformly using the Modified Bernstein hash. if (array == null) { return 0; int h = 1; for (T o : array) { int x = (o == null) ? 0 : o.hashCode(); h = ((h << 5) - h) ^ x; return h; |
int | hashCode(float[] array) Hash every element uniformly using the Modified Bernstein hash. if (array == null) { return 0; int h = 1; for (float f : array) { int x = Float.floatToIntBits(f); h = ((h << 5) - h) ^ x; return h; |
int | hashCode(int x) hash Code return hashCode(new int[] { x }); |
int | hashCode(int x, int y) hash Code return hashCode(new int[] { x, y }); |
int | hashCode(int x, int y, int z) hash Code return hashCode(new int[] { x, y, z }); |