Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 61 for nextInt (0.06 sec)

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

            int len = random.nextInt(value.length - off + 1);
            for (PrimitiveSink sink : sinks) {
              sink.putBytes(value, off, len);
            }
          }
        },
        PUT_BYTE_BUFFER() {
          @Override
          void performAction(Random random, Iterable<? extends PrimitiveSink> sinks) {
            byte[] value = new byte[random.nextInt(128)];
            random.nextBytes(value);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/ConcurrentHashMultisetBasherTest.java

          for (int i = 0; i < iterations; i++) {
            int keyIndex = random.nextInt(nKeys);
            String key = keys.get(keyIndex);
            Operation op = operations[random.nextInt(operations.length)];
            switch (op) {
              case ADD:
                {
                  int delta = random.nextInt(10);
                  multiset.add(key, delta);
                  deltas[keyIndex] += delta;
                  break;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/primitives/ImmutableDoubleArrayTest.java

            double num = RANDOM.nextInt(10);
            for (int i = 0; i < num; i++) {
              list.add((double) counter.getAndIncrement());
            }
            builder.addAll(iterable(list));
          }
        },
        ADD_STREAM {
          @Override
          void doIt(ImmutableDoubleArray.Builder builder, AtomicInteger counter) {
            double[] array = new double[RANDOM.nextInt(10)];
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

        for (int i = 0; i < heapSize; i++) {
          mmHeap.add(random.nextInt());
        }
        for (int i = 0; i < numberOfModifications; i++) {
          mmHeap.removeAt(random.nextInt(mmHeap.size()));
          assertIntactUsingSeed(seed, mmHeap);
          mmHeap.add(random.nextInt());
          assertIntactUsingSeed(seed, mmHeap);
        }
      }
    
      public void testRemoveAt_exhaustive() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 35.9K bytes
    - Viewed (0)
  5. android/guava-tests/benchmark/com/google/common/math/BigIntegerMathBenchmark.java

      int factorialBound;
    
      @BeforeExperiment
      void setUp() {
        for (int i = 0; i < ARRAY_SIZE; i++) {
          factorials[i] = RANDOM_SOURCE.nextInt(factorialBound);
          slowFactorials[i] = RANDOM_SOURCE.nextInt(factorialBound);
          binomials[i] = RANDOM_SOURCE.nextInt(factorials[i] + 1);
        }
      }
    
      /** Previous version of BigIntegerMath.factorial, kept for timing purposes. */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Aug 19 16:21:24 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  6. guava-tests/benchmark/com/google/common/math/BigIntegerMathBenchmark.java

      int factorialBound;
    
      @BeforeExperiment
      void setUp() {
        for (int i = 0; i < ARRAY_SIZE; i++) {
          factorials[i] = RANDOM_SOURCE.nextInt(factorialBound);
          slowFactorials[i] = RANDOM_SOURCE.nextInt(factorialBound);
          binomials[i] = RANDOM_SOURCE.nextInt(factorials[i] + 1);
        }
      }
    
      /** Previous version of BigIntegerMath.factorial, kept for timing purposes. */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Aug 19 16:21:24 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/primitives/ImmutableIntArrayTest.java

            int num = RANDOM.nextInt(10);
            for (int i = 0; i < num; i++) {
              list.add(counter.getAndIncrement());
            }
            builder.addAll(iterable(list));
          }
        },
        ADD_STREAM {
          @Override
          void doIt(ImmutableIntArray.Builder builder, AtomicInteger counter) {
            int[] array = new int[RANDOM.nextInt(10)];
            for (int i = 0; i < array.length; i++) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 20.1K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/primitives/ImmutableDoubleArrayTest.java

            double num = RANDOM.nextInt(10);
            for (int i = 0; i < num; i++) {
              list.add((double) counter.getAndIncrement());
            }
            builder.addAll(iterable(list));
          }
        },
        ADD_STREAM {
          @Override
          void doIt(ImmutableDoubleArray.Builder builder, AtomicInteger counter) {
            double[] array = new double[RANDOM.nextInt(10)];
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

        for (int i = 0; i < heapSize; i++) {
          mmHeap.add(random.nextInt());
        }
        for (int i = 0; i < numberOfModifications; i++) {
          mmHeap.removeAt(random.nextInt(mmHeap.size()));
          assertIntactUsingSeed(seed, mmHeap);
          mmHeap.add(random.nextInt());
          assertIntactUsingSeed(seed, mmHeap);
        }
      }
    
      public void testRemoveAt_exhaustive() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 35.9K bytes
    - Viewed (0)
  10. android/guava-tests/benchmark/com/google/common/collect/MultisetIteratorBenchmark.java

        // TODO(kevinb): generate better test contents for multisets
        while (sizeRemaining > 0) {
          // The JVM will return interned values for small ints.
          Integer value = random.nextInt(1000) + 128;
          int count = min(random.nextInt(10) + 1, sizeRemaining);
          sizeRemaining -= count;
          hashMultiset.add(value, count);
          linkedHashMultiset.add(value, count);
          treeMultiset.add(value, count);
        }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 2.7K bytes
    - Viewed (0)
Back to top