Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 166 for Seed (0.13 sec)

  1. 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)
  2. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.2K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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 May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 1.4K bytes
    - Viewed (0)
  6. 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 May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.5K bytes
    - Viewed (0)
  7. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 08 13:56:22 GMT 2021
    - 8.6K 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/graph/GraphMutationTest.java

      public void undirectedGraph() {
        testGraphMutation(GraphBuilder.undirected());
      }
    
      private static void testGraphMutation(GraphBuilder<? super Integer> graphBuilder) {
        Random gen = new Random(42); // Fixed seed so test results are deterministic.
    
        for (int trial = 0; trial < NUM_TRIALS; ++trial) {
          MutableGraph<Integer> graph = graphBuilder.allowsSelfLoops(true).build();
    
          assertThat(graph.nodes()).isEmpty();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Aug 18 16:17:46 GMT 2017
    - 4.2K bytes
    - Viewed (0)
  10. guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java

    public class ChecksumBenchmark {
    
      // Use a constant seed for all of the benchmarks to ensure apples to apples comparisons.
      private static final int RANDOM_SEED = new Random().nextInt();
    
      @Param({"10", "1000", "100000", "1000000"})
      private int size;
    
      private byte[] testBytes;
    
      @BeforeExperiment
      void setUp() {
        testBytes = new byte[size];
        new Random(RANDOM_SEED).nextBytes(testBytes);
      }
    
      // CRC32
    
    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)
Back to top