Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 408 for seed (0.19 sec)

  1. android/guava/src/com/google/common/hash/Murmur3_32HashFunction.java

          new Murmur3_32HashFunction(Hashing.GOOD_FAST_HASH_SEED, /* supplementaryPlaneFix= */ true);
    
      private static final int CHUNK_SIZE = 4;
    
      private static final int C1 = 0xcc9e2d51;
      private static final int C2 = 0x1b873593;
    
      private final int seed;
      private final boolean supplementaryPlaneFix;
    
      Murmur3_32HashFunction(int seed, boolean supplementaryPlaneFix) {
        this.seed = 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)
  2. android/guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

          long seed = insertRandomly(elements, q);
          while (!q.isEmpty()) {
            elements.add(0, q.pollLast());
          }
          assertEqualsUsingSeed(seed, expected, elements);
        }
      }
    
      public void testCorrectOrdering_randomAccess() {
        long seed = new Random().nextLong();
        Random random = new Random(seed);
        PriorityQueue<Integer> control = new PriorityQueue<>();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 36.1K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/hash/Murmur3Hash32Test.java

      }
    
      public void testParanoidHashBytes() {
        HashFn hf =
            new HashFn() {
              @Override
              public byte[] hash(byte[] input, int seed) {
                return murmur3_32(seed).hashBytes(input).asBytes();
              }
            };
        // Murmur3A, MurmurHash3 for x86, 32-bit (MurmurHash3_x86_32)
        // https://github.com/aappleby/smhasher/blob/master/src/main.cpp
    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)
  4. android/guava/src/com/google/common/hash/Hashing.java

        hashFunctions[0] = Murmur3_128HashFunction.GOOD_FAST_HASH_128;
        int seed = GOOD_FAST_HASH_SEED;
        for (int i = 1; i < hashFunctionsNeeded; i++) {
          seed += 1500450271; // a prime; shouldn't matter
          hashFunctions[i] = murmur3_128(seed);
        }
        return new ConcatenatedHashFunction(hashFunctions);
      }
    
      /**
    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)
  5. android/guava-tests/test/com/google/common/hash/HashingTest.java

        assertEquals(22152, Hashing.consistentHash(2201, 100001));
        assertEquals(15018, Hashing.consistentHash(2202, 100001));
      }
    
      private static final double MAX_PERCENT_SPREAD = 0.5;
      private static final long RANDOM_SEED = 177L;
    
      public void testCombineOrdered_empty() {
        assertThrows(
            IllegalArgumentException.class,
            () -> Hashing.combineOrdered(Collections.<HashCode>emptySet()));
      }
    
    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)
  6. guava-tests/benchmark/com/google/common/hash/MessageDigestAlgorithmBenchmark.java

          return hashFn;
        }
      }
    
      // Use a constant seed for all of the benchmarks to ensure apples to apples comparisons.
      private static final int RANDOM_SEED = new Random().nextInt();
    
      private byte[] testBytes;
    
      @BeforeExperiment
      void setUp() {
        testBytes = new byte[size];
        new Random(RANDOM_SEED).nextBytes(testBytes);
      }
    
      @Benchmark
      byte hashing(int reps) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.5K bytes
    - Viewed (0)
  7. guava-tests/benchmark/com/google/common/hash/HashStringBenchmark.java

       * StringBuilders (in a CharSequence[] to make it a little harder for the JVM).
       */
      @BeforeExperiment
      void setUp() {
        final long seed = 99;
        final Random rnd = new Random(seed);
        strings = new String[SAMPLES];
        for (int i = 0; i < SAMPLES; i++) {
          StringBuilder sb = new StringBuilder();
          for (int j = 0; j < charCount; j++) {
            int codePoint;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 5.3K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java

              notification.getValue());
        }
    
        // All of the seed values should have been visible, so we should have gotten removal
        // notifications for all of them.
        for (int i = 0; i < nSeededEntries; i++) {
          assertEquals("b" + i, removalNotifications.get("b" + i));
        }
    
        // Each of the values added to the map should either still be there, or have seen a removal
        // notification.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 23.2K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/hash/HashTestUtils.java

      }
    
      interface HashFn {
        byte[] hash(byte[] input, int seed);
      }
    
      static void verifyHashFunction(HashFn hashFunction, int hashbits, int expected) {
        int hashBytes = hashbits / 8;
    
        byte[] key = new byte[256];
        byte[] hashes = new byte[hashBytes * 256];
    
        // Hash keys of the form {}, {0}, {0,1}, {0,1,2}... up to N=255,using 256-N as the seed
        for (int i = 0; i < 256; i++) {
          key[i] = (byte) i;
    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)
  10. android/guava/src/com/google/common/hash/Murmur3_128HashFunction.java

          new Murmur3_128HashFunction(Hashing.GOOD_FAST_HASH_SEED);
    
      // TODO(user): when the shortcuts are implemented, update BloomFilterStrategies
      private final int seed;
    
      Murmur3_128HashFunction(int seed) {
        this.seed = seed;
      }
    
      @Override
      public int bits() {
        return 128;
      }
    
      @Override
      public Hasher newHasher() {
        return new Murmur3_128Hasher(seed);
      }
    
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 5.6K bytes
    - Viewed (0)
Back to top