- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 277 for hashInt (0.08 sec)
-
android/guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java
byte result = 0x01; // Trick the JVM to prevent it from using the hash function non-polymorphically result ^= Hashing.crc32().hashInt(reps).asBytes()[0]; result ^= Hashing.adler32().hashInt(reps).asBytes()[0]; result ^= Hashing.fingerprint2011().hashInt(reps).asBytes()[0]; for (int i = 0; i < reps; i++) { result ^= hashFunction.hashBytes(testBytes).asBytes()[0]; } return result;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 16 16:53:43 UTC 2024 - 3.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/Murmur3Hash32Test.java
public void testKnownIntegerInputs() { assertHash(593689054, murmur3_32().hashInt(0)); assertHash(-189366624, murmur3_32().hashInt(-42)); assertHash(-1134849565, murmur3_32().hashInt(42)); assertHash(-1718298732, murmur3_32().hashInt(Integer.MIN_VALUE)); assertHash(-1653689534, murmur3_32().hashInt(Integer.MAX_VALUE)); } public void testKnownLongInputs() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:29:46 UTC 2024 - 8.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/HashTestUtils.java
int key1 = rand.nextInt(); // flip input bit for key2 int key2 = key1 ^ (1 << i); // get hashes int hash1 = function.hashInt(key1).asInt(); int hash2 = function.hashInt(key2).asInt(); // test whether the hash values have same output bits same |= ~(hash1 ^ hash2); // test whether the hash values have different output bits
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 25.5K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java
byte result = 0x01; // Trick the JVM to prevent it from using the hash function non-polymorphically result ^= Hashing.crc32().hashInt(reps).asBytes()[0]; result ^= Hashing.adler32().hashInt(reps).asBytes()[0]; result ^= Hashing.fingerprint2011().hashInt(reps).asBytes()[0]; for (int i = 0; i < reps; i++) { result ^= hashFunction.hashBytes(testBytes).asBytes()[0]; } return result;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 16 16:53:43 UTC 2024 - 3.4K bytes - Viewed (0) -
guava/src/com/google/common/hash/AbstractNonStreamingHashFunction.java
@Override public Hasher newHasher(int expectedInputSize) { Preconditions.checkArgument(expectedInputSize >= 0); return new BufferingHasher(expectedInputSize); } @Override public HashCode hashInt(int input) { return hashBytes(ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(input).array()); } @Override public HashCode hashLong(long input) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Apr 20 18:43:59 UTC 2021 - 3.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/HashingTest.java
Hashing.md5().bits() + Hashing.md5().bits(), Hashing.concatenating(Hashing.md5(), Hashing.md5()).bits()); assertEquals( Hashing.md5().bits() + Hashing.murmur3_32().bits(), Hashing.concatenating(Hashing.md5(), Hashing.murmur3_32()).bits()); assertEquals( Hashing.md5().bits() + Hashing.murmur3_32().bits() + Hashing.murmur3_128().bits(),
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 09 17:40:09 UTC 2024 - 26.3K bytes - Viewed (0) -
guava/src/com/google/common/hash/Murmur3_32HashFunction.java
new Murmur3_32HashFunction(0, /* supplementaryPlaneFix= */ true); // We can include the non-BMP fix here because Hashing.goodFastHash stresses that the hash is a // temporary-use one. Therefore it shouldn't be persisted. static final HashFunction GOOD_FAST_HASH_32 = new Murmur3_32HashFunction(Hashing.GOOD_FAST_HASH_SEED, /* supplementaryPlaneFix= */ true); private static final int CHUNK_SIZE = 4;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Aug 02 13:50:22 UTC 2024 - 11.8K bytes - Viewed (0) -
android/guava/src/com/google/common/hash/HashFunction.java
* array. This hashing API accepts an arbitrary sequence of byte and multibyte values (via * {@link Hasher}), but this is merely a convenience; these are always translated into raw * byte sequences under the covers. * <li><b>hash code:</b> each hash function always yields hash codes of the same fixed bit length * (given by {@link #bits}). For example, {@link Hashing#sha1} produces a 160-bit number,
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue May 25 18:22:59 UTC 2021 - 10.9K bytes - Viewed (0) -
guava/src/com/google/common/hash/HashFunction.java
* array. This hashing API accepts an arbitrary sequence of byte and multibyte values (via * {@link Hasher}), but this is merely a convenience; these are always translated into raw * byte sequences under the covers. * <li><b>hash code:</b> each hash function always yields hash codes of the same fixed bit length * (given by {@link #bits}). For example, {@link Hashing#sha1} produces a 160-bit number,
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue May 25 18:22:59 UTC 2021 - 10.9K bytes - Viewed (0) -
guava/src/com/google/common/collect/Hashing.java
* * @author Kevin Bourrillion * @author Jesse Wilson * @author Austin Appleby */ @GwtCompatible @ElementTypesAreNonnullByDefault final class Hashing { private Hashing() {} /* * These should be ints, but we need to use longs to force GWT to do the multiplications with * enough precision. */ private static final long C1 = 0xcc9e2d51;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 20:24:49 UTC 2024 - 2.5K bytes - Viewed (0)