Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 212 for random (0.21 sec)

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

          assertHashLongEquivalence(hashFunction, random);
          assertHashStringEquivalence(hashFunction, random);
          assertHashStringWithSurrogatesEquivalence(hashFunction, random);
        }
      }
    
      private static void assertHashBytesEquivalence(HashFunction hashFunction, Random random) {
        int size = random.nextInt(2048);
        byte[] bytes = new byte[size];
        random.nextBytes(bytes);
    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/HashTestUtils.java

          assertHashLongEquivalence(hashFunction, random);
          assertHashStringEquivalence(hashFunction, random);
          assertHashStringWithSurrogatesEquivalence(hashFunction, random);
        }
      }
    
      private static void assertHashBytesEquivalence(HashFunction hashFunction, Random random) {
        int size = random.nextInt(2048);
        byte[] bytes = new byte[size];
        random.nextBytes(bytes);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 25.3K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/primitives/ImmutableLongArrayTest.java

      }
    
      private static final Random RANDOM = new Random(42);
    
      public void testLength() {
        assertThat(ImmutableLongArray.of().length()).isEqualTo(0);
        assertThat(ImmutableLongArray.of(0).length()).isEqualTo(1);
        assertThat(ImmutableLongArray.of(0, 1, 3).length()).isEqualTo(3);
        assertThat(ImmutableLongArray.of(0, 1, 3).subArray(1, 1).length()).isEqualTo(0);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Jun 01 09:32:35 GMT 2023
    - 19K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/primitives/ImmutableDoubleArrayTest.java

      }
    
      private static final Random RANDOM = new Random(42);
    
      public void testLength() {
        assertThat(ImmutableDoubleArray.of().length()).isEqualTo(0);
        assertThat(ImmutableDoubleArray.of(0).length()).isEqualTo(1);
        assertThat(ImmutableDoubleArray.of(0, 1, 3).length()).isEqualTo(3);
        assertThat(ImmutableDoubleArray.of(0, 1, 3).subArray(1, 1).length()).isEqualTo(0);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Jun 01 09:32:35 GMT 2023
    - 21.3K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/AtomicLongMapTest.java

    import java.util.Map;
    import java.util.Random;
    import java.util.Set;
    import junit.framework.TestCase;
    
    /**
     * Tests for {@link AtomicLongMap}.
     *
     * @author mike nonemacher
     */
    @GwtCompatible(emulated = true)
    public class AtomicLongMapTest extends TestCase {
      private static final int ITERATIONS = 100;
      private static final int MAX_ADDEND = 100;
    
      private final Random random = new Random(301);
    
      @J2ktIncompatible
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 17.4K bytes
    - Viewed (0)
  6. guava-tests/benchmark/com/google/common/collect/ConcurrentHashMultisetBenchmark.java

          total += future.get();
        }
        return total;
      }
    
      private long runAddSingleThread(int reps) {
        Random random = new Random();
        int nKeys = keys.size();
        long blah = 0;
        for (int i = 0; i < reps; i++) {
          Integer key = keys.get(random.nextInt(nKeys));
          int delta = random.nextInt(5);
          blah += delta;
          multiset.add(key, delta);
        }
        return blah;
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed May 09 15:17:25 GMT 2018
    - 16.6K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

        long seed = new Random().nextLong();
        Random random = new Random(seed);
        insertRandomly(elements, q, random);
        return seed;
      }
    
      private static void insertRandomly(
          ArrayList<Integer> elements, MinMaxPriorityQueue<Integer> q, Random random) {
        while (!elements.isEmpty()) {
          int selectedIndex = random.nextInt(elements.size());
    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)
  8. android/guava/src/com/google/common/cache/Striped64.java

       * class-unloading when ThreadLocals are not removed.
       */
      static final ThreadLocal<int @Nullable []> threadHashCode = new ThreadLocal<>();
    
      /** Generator of new random hash codes */
      static final Random rng = new Random();
    
      /** Number of CPUS, to place bound on table size */
      static final int NCPU = Runtime.getRuntime().availableProcessors();
    
      /** Table of cells. When non-null, size is a power of 2. */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 11.5K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/primitives/ImmutableIntArrayTest.java

      }
    
      private static final Random RANDOM = new Random(42);
    
      public void testLength() {
        assertThat(ImmutableIntArray.of().length()).isEqualTo(0);
        assertThat(ImmutableIntArray.of(0).length()).isEqualTo(1);
        assertThat(ImmutableIntArray.of(0, 1, 3).length()).isEqualTo(3);
        assertThat(ImmutableIntArray.of(0, 1, 3).subArray(1, 1).length()).isEqualTo(0);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Jun 01 09:32:35 GMT 2023
    - 20.2K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/hash/HashingTest.java

      }
    
      public void testCombineOrdered_randomHashCodes() {
        Random random = new Random(7);
        List<HashCode> hashCodes = Lists.newArrayList();
        for (int i = 0; i < 10; i++) {
          hashCodes.add(HashCode.fromLong(random.nextLong()));
        }
        HashCode hashCode1 = Hashing.combineOrdered(hashCodes);
        Collections.shuffle(hashCodes, random);
        HashCode hashCode2 = Hashing.combineOrdered(hashCodes);
    
    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)
Back to top