Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,426 for seed (0.2 sec)

  1. android/guava-tests/test/com/google/common/collect/SpecialRandom.java

      }
    
      private final boolean hasSeed;
      private final long seed;
    
      public SpecialRandom() {
        this.hasSeed = false;
        this.seed = 0;
      }
    
      public SpecialRandom(long seed) {
        super(seed);
        this.hasSeed = true;
        this.seed = seed;
      }
    
      @Override
      public String toString() {
        return hasSeed ? "(seed:" + seed : "(default seed)";
      }
    
      private static final long serialVersionUID = 0;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 1.4K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/SpecialRandom.java

      }
    
      private final boolean hasSeed;
      private final long seed;
    
      public SpecialRandom() {
        this.hasSeed = false;
        this.seed = 0;
      }
    
      public SpecialRandom(long seed) {
        super(seed);
        this.hasSeed = true;
        this.seed = seed;
      }
    
      @Override
      public String toString() {
        return hasSeed ? "(seed:" + seed : "(default seed)";
      }
    
      private static final long serialVersionUID = 0;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 1.4K bytes
    - Viewed (0)
  3. internal/dsync/locked_rand.go

    func (r *lockedRandSource) Int63() (n int64) {
    	r.lk.Lock()
    	n = r.src.Int63()
    	r.lk.Unlock()
    	return
    }
    
    // Seed uses the provided seed value to initialize the generator to a
    // deterministic state.
    func (r *lockedRandSource) Seed(seed int64) {
    	r.lk.Lock()
    	r.src.Seed(seed)
    	r.lk.Unlock()
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Oct 18 15:39:59 GMT 2021
    - 1.3K 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 19 12:43:09 GMT 2024
    - Last Modified: Tue Apr 09 00:37:15 GMT 2024
    - 29.2K bytes
    - Viewed (0)
  5. 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 19 12:43:09 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 11.9K bytes
    - Viewed (0)
  6. 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 19 12:43:09 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 5.6K bytes
    - Viewed (0)
  7. android/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)
  8. guava-tests/test/com/google/common/hash/Murmur3Hash128Test.java

      }
    
      private static void assertHash(int seed, long expected1, long expected2, String stringInput) {
        HashCode expected = toHashCode(expected1, expected2);
        byte[] input = HashTestUtils.ascii(stringInput);
        assertEquals(expected, murmur3_128(seed).hashBytes(input));
        assertEquals(expected, murmur3_128(seed).newHasher().putBytes(input).hash());
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.2K bytes
    - Viewed (0)
  9. 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 Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 36.1K bytes
    - Viewed (0)
  10. 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 Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 36.1K bytes
    - Viewed (0)
Back to top