Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for nextLong (0.21 sec)

  1. guava-tests/benchmark/com/google/common/primitives/UnsignedLongsBenchmark.java

          tmp += UnsignedLongs.toString(x, 16).length();
          tmp += UnsignedLongs.toString(x, 2).length();
        }
        return tmp;
      }
    
      private static long random() {
        return RANDOM_SOURCE.nextLong();
      }
    
      // A random value that cannot be 0 and that is unsigned-less-than or equal
      // to the given dividend, so that we don't have half of our divisions being
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.3K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/hash/HashingTest.java

                params1[i] = random.nextInt();
                params2[i] = random.nextInt();
              } else if (method.getParameterTypes()[i] == long.class) {
                params1[i] = random.nextLong();
                params2[i] = random.nextLong();
              } else {
                fail("Unable to create a random parameter for " + method.getParameterTypes()[i]);
              }
            }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 26.5K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/math/LessThanBenchmark.java

        for (int i = 0; i < SAMPLE_SIZE; i++) {
          xInts[i] = random.nextInt(Integer.MAX_VALUE);
          yInts[i] = random.nextInt(Integer.MAX_VALUE);
          xLongs[i] = random.nextLong() & NONNEGATIVE_LONG_MASK;
          yLongs[i] = random.nextLong() & NONNEGATIVE_LONG_MASK;
          constant[i] = random.nextInt();
        }
      }
    
      @Benchmark
      int branchFreeLtIntInlined(int reps) {
        int tmp = 0;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4K bytes
    - Viewed (0)
  4. guava-tests/benchmark/com/google/common/math/LongMathRoundingBenchmark.java

        for (int i = 0; i < ARRAY_SIZE; i++) {
          positive[i] = randomPositiveBigInteger(Long.SIZE - 2).longValue();
          nonzero[i] = randomNonZeroBigInteger(Long.SIZE - 2).longValue();
          longs[i] = RANDOM_SOURCE.nextLong();
        }
      }
    
      @Benchmark
      int log2(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += LongMath.log2(positive[j], mode);
        }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.6K bytes
    - Viewed (0)
  5. guava-tests/benchmark/com/google/common/math/LessThanBenchmark.java

        for (int i = 0; i < SAMPLE_SIZE; i++) {
          xInts[i] = random.nextInt(Integer.MAX_VALUE);
          yInts[i] = random.nextInt(Integer.MAX_VALUE);
          xLongs[i] = random.nextLong() & NONNEGATIVE_LONG_MASK;
          yLongs[i] = random.nextLong() & NONNEGATIVE_LONG_MASK;
          constant[i] = random.nextInt();
        }
      }
    
      @Benchmark
      int branchFreeLtIntInlined(int reps) {
        int tmp = 0;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/primitives/UnsignedLongsTest.java

      public void testDivideRemainderEuclideanProperty() {
        // Use a seed so that the test is deterministic:
        Random r = new Random(0L);
        for (int i = 0; i < 1000000; i++) {
          long dividend = r.nextLong();
          long divisor = r.nextLong();
          // Test that the Euclidean property is preserved:
          assertThat(
                  dividend
                      - (divisor * UnsignedLongs.divide(dividend, divisor)
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:36:17 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/primitives/UnsignedLongsTest.java

      public void testDivideRemainderEuclideanProperty() {
        // Use a seed so that the test is deterministic:
        Random r = new Random(0L);
        for (int i = 0; i < 1000000; i++) {
          long dividend = r.nextLong();
          long divisor = r.nextLong();
          // Test that the Euclidean property is preserved:
          assertThat(
                  dividend
                      - (divisor * UnsignedLongs.divide(dividend, divisor)
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:36:17 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  8. android/guava-tests/benchmark/com/google/common/math/LongMathBenchmark.java

          exponents[i] = randomExponent();
          positive[i] = randomPositiveBigInteger(Long.SIZE - 1).longValue();
          nonnegative[i] = randomNonNegativeBigInteger(Long.SIZE - 1).longValue();
          longs[i] = RANDOM_SOURCE.nextLong();
          factorialArguments[i] = RANDOM_SOURCE.nextInt(30);
          binomialArguments[i][1] = RANDOM_SOURCE.nextInt(MathBenchmarking.biggestBinomials.length);
          int k = binomialArguments[i][1];
    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)
  9. guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

      }
    
      public void testIteratorTesterLarger() throws Exception {
        runIterator(Lists.newArrayList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), 5);
      }
    
      public void testRemoveAt() {
        long seed = new Random().nextLong();
        Random random = new Random(seed);
        int heapSize = 999;
        int numberOfModifications = reduceIterationsIfGwt(500);
        MinMaxPriorityQueue<Integer> mmHeap =
    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. android/guava-tests/test/com/google/common/hash/HashingTest.java

                params1[i] = random.nextInt();
                params2[i] = random.nextInt();
              } else if (method.getParameterTypes()[i] == long.class) {
                params1[i] = random.nextLong();
                params2[i] = random.nextLong();
              } else {
                fail("Unable to create a random parameter for " + method.getParameterTypes()[i]);
              }
            }
    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