Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 89 for bits (0.3 sec)

  1. guava-tests/test/com/google/common/hash/HashTestUtils.java

       * Test for avalanche with 2-bit deltas. Most probabilities of output bit(j) differing are well
       * within 50%.
       */
      static void check2BitAvalanche(HashFunction function, int trials, double epsilon) {
        Random rand = new Random(0);
        int keyBits = 32;
        int hashBits = function.bits();
        for (int bit1 = 0; bit1 < keyBits; bit1++) {
          for (int bit2 = 0; bit2 < keyBits; bit2++) {
            if (bit2 <= bit1) continue;
    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)
  2. android/guava-tests/test/com/google/common/hash/HashingTest.java

            Hashing.concatenating(asList(Hashing.md5(), Hashing.murmur3_32(), Hashing.murmur3_128()))
                .bits());
      }
    
      public void testConcatenatingVarArgs_bits() {
        assertEquals(
            Hashing.md5().bits() + Hashing.md5().bits(),
            Hashing.concatenating(Hashing.md5(), Hashing.md5()).bits());
        assertEquals(
            Hashing.md5().bits() + Hashing.murmur3_32().bits(),
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 26.5K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/hash/AbstractNonStreamingHashFunctionTest.java

        // the output, so the input must be at least 32 bits, since the output has to be that long
        assertPutString(new char[] {'p', HashTestUtils.randomLowSurrogate(new Random())});
      }
    
      public void testPutStringWithHighSurrogate() {
        // we pad because the dummy hash function we use to test this, merely copies the input into
        // the output, so the input must be at least 32 bits, since the output has to be that long
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.4K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/hash/AbstractNonStreamingHashFunctionTest.java

        // the output, so the input must be at least 32 bits, since the output has to be that long
        assertPutString(new char[] {'p', HashTestUtils.randomLowSurrogate(new Random())});
      }
    
      public void testPutStringWithHighSurrogate() {
        // we pad because the dummy hash function we use to test this, merely copies the input into
        // the output, so the input must be at least 32 bits, since the output has to be that long
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.4K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/CompactHashMap.java

       * metadata} is the size that the arrays should be allocated with. Once the arrays have been
       * allocated, the value of {@code metadata} combines the number of bits in the "short hash", in
       * its bottom {@value CompactHashing#HASH_TABLE_BITS_MAX_BITS} bits, with a modification count in
       * the remaining bits that is used to detect concurrent modification during iteration.
       */
      private transient int metadata;
    
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Jun 26 21:02:13 GMT 2023
    - 39.8K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/math/LongMathTest.java

        for (int bits = 10; bits < 63; bits++) {
          for (int i = 0; i < 100; i++) {
            long p = BigInteger.probablePrime(bits, rand).longValue();
            assertTrue(LongMath.isPrime(p));
          }
        }
      }
    
      @GwtIncompatible // isPrime is GWT-incompatible
      public void testIsPrimeOnRandomComposites() {
        Random rand = new Random(1);
        for (int bits = 5; bits < 32; bits++) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 20:15:57 GMT 2024
    - 32.5K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/CompactHashSet.java

      /** Stores the hash table mask as the number of bits needed to represent an index. */
      private void setHashTableMask(int mask) {
        int hashTableBits = Integer.SIZE - Integer.numberOfLeadingZeros(mask);
        metadata =
            CompactHashing.maskCombine(metadata, hashTableBits, CompactHashing.HASH_TABLE_BITS_MASK);
      }
    
      /** Gets the hash table mask using the stored number of hash table bits. */
      private int hashTableMask() {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Feb 05 21:38:59 GMT 2024
    - 24.9K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/hash/Hashing.java

      public static HashFunction goodFastHash(int minimumBits) {
        int bits = checkPositiveAndMakeMultipleOf32(minimumBits);
    
        if (bits == 32) {
          return Murmur3_32HashFunction.GOOD_FAST_HASH_32;
        }
        if (bits <= 128) {
          return Murmur3_128HashFunction.GOOD_FAST_HASH_128;
        }
    
        // Otherwise, join together some 128-bit murmur3s
        int hashFunctionsNeeded = (bits + 127) / 128;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 09 00:37:15 GMT 2024
    - 29.2K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/hash/Murmur3_32HashFunction.java

      Murmur3_32HashFunction(int seed, boolean supplementaryPlaneFix) {
        this.seed = seed;
        this.supplementaryPlaneFix = supplementaryPlaneFix;
      }
    
      @Override
      public int bits() {
        return 32;
      }
    
      @Override
      public Hasher newHasher() {
        return new Murmur3_32Hasher(seed);
      }
    
      @Override
      public String toString() {
        return "Hashing.murmur3_32(" + seed + ")";
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 11.9K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/math/DoubleUtils.java

        }
    
        /*
         * We need the top SIGNIFICAND_BITS + 1 bits, including the "implicit" one bit. To make rounding
         * easier, we pick out the top SIGNIFICAND_BITS + 2 bits, so we have one to help us round up or
         * down. twiceSignifFloor will contain the top SIGNIFICAND_BITS + 2 bits, and signifFloor the
         * top SIGNIFICAND_BITS + 1.
         *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 28 15:37:52 GMT 2021
    - 5.1K bytes
    - Viewed (0)
Back to top