Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 315 for hashInt (0.17 sec)

  1. 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() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 08 13:56:22 GMT 2021
    - 8.6K bytes
    - Viewed (0)
  2. 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() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 08 13:56:22 GMT 2021
    - 8.6K bytes
    - Viewed (0)
  3. 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
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 25.3K bytes
    - Viewed (0)
  4. android/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
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 25.3K bytes
    - Viewed (0)
  5. 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];
        for (int i = 0; i < reps; i++) {
          result ^= hashFunction.hashBytes(testBytes).asBytes()[0];
        }
        return result;
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jun 13 16:19:15 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  6. 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];
        for (int i = 0; i < reps; i++) {
          result ^= hashFunction.hashBytes(testBytes).asBytes()[0];
        }
        return result;
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jun 13 16:19:15 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  7. android/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) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 3.8K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/hash/AbstractHashFunction.java

      }
    
      @Override
      public HashCode hashString(CharSequence input, Charset charset) {
        return newHasher().putString(input, charset).hash();
      }
    
      @Override
      public HashCode hashInt(int input) {
        return newHasher(4).putInt(input).hash();
      }
    
      @Override
      public HashCode hashLong(long input) {
        return newHasher(8).putLong(input).hash();
      }
    
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 2.5K bytes
    - Viewed (0)
  9. android/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(),
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 26.5K bytes
    - Viewed (0)
  10. 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(),
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 26.5K bytes
    - Viewed (0)
Back to top