Home
last modified time | relevance | path

Searched refs:RANDOM_SOURCE (Results 1 – 9 of 9) sorted by relevance

/external/guava/guava-tests/test/com/google/common/math/
DMathBenchmarking.java35 static final Random RANDOM_SOURCE = new Random(314159265358979L); field in MathBenchmarking
67 int digits = RANDOM_SOURCE.nextInt(numBits); in randomNonNegativeBigInteger()
69 return new BigInteger(1, RANDOM_SOURCE); in randomNonNegativeBigInteger()
71 return new BigInteger(digits, RANDOM_SOURCE) in randomNonNegativeBigInteger()
82 return RANDOM_SOURCE.nextBoolean() ? result : result.negate(); in randomNonZeroBigInteger()
91 if (RANDOM_SOURCE.nextBoolean()) { in randomBigInteger()
110 double result = RANDOM_SOURCE.nextDouble(); in randomDouble()
111 result = Math.scalb(result, RANDOM_SOURCE.nextInt(maxExponent + 1)); in randomDouble()
112 return RANDOM_SOURCE.nextBoolean() ? result : -result; in randomDouble()
119 return RANDOM_SOURCE.nextInt(MAX_EXPONENT + 1); in randomExponent()
/external/guava/guava-tests/benchmark/com/google/common/math/
DLongMathBenchmark.java21 import static com.google.common.math.MathBenchmarking.RANDOM_SOURCE;
49 longs[i] = RANDOM_SOURCE.nextLong(); in setUp()
50 factorialArguments[i] = RANDOM_SOURCE.nextInt(30); in setUp()
51 binomialArguments[i][1] = RANDOM_SOURCE.nextInt(MathBenchmarking.biggestBinomials.length); in setUp()
54 RANDOM_SOURCE.nextInt(MathBenchmarking.biggestBinomials[k] - k) + k; in setUp()
DIntMathBenchmark.java21 import static com.google.common.math.MathBenchmarking.RANDOM_SOURCE;
47 factorial[i] = RANDOM_SOURCE.nextInt(50); in setUp()
48 binomial[i] = RANDOM_SOURCE.nextInt(factorial[i] + 1); in setUp()
51 ints[i] = RANDOM_SOURCE.nextInt(); in setUp()
DBigIntegerMathBenchmark.java21 import static com.google.common.math.MathBenchmarking.RANDOM_SOURCE;
49 factorials[i] = RANDOM_SOURCE.nextInt(factorialBound); in setUp()
50 slowFactorials[i] = RANDOM_SOURCE.nextInt(factorialBound); in setUp()
51 binomials[i] = RANDOM_SOURCE.nextInt(factorials[i] + 1); in setUp()
DApacheBenchmark.java21 import static com.google.common.math.MathBenchmarking.RANDOM_SOURCE;
135 factorials[i] = RANDOM_SOURCE.nextInt(200); in setUp()
161 int k = binomials[i][1] = RANDOM_SOURCE.nextInt(MathBenchmarking.biggestBinomials.length); in setUp()
162 binomials[i][0] = RANDOM_SOURCE.nextInt(MathBenchmarking.biggestBinomials[k] - k) + k; in setUp()
DDoubleMathBenchmark.java21 import static com.google.common.math.MathBenchmarking.RANDOM_SOURCE;
43 factorials[i] = RANDOM_SOURCE.nextInt(100); in setUp()
DIntMathRoundingBenchmark.java21 import static com.google.common.math.MathBenchmarking.RANDOM_SOURCE;
47 ints[i] = RANDOM_SOURCE.nextInt(); in setUp()
DLongMathRoundingBenchmark.java21 import static com.google.common.math.MathBenchmarking.RANDOM_SOURCE;
50 longs[i] = RANDOM_SOURCE.nextLong(); in setUp()
/external/guava/guava-tests/benchmark/com/google/common/primitives/
DUnsignedLongsBenchmark.java32 private static final Random RANDOM_SOURCE = new Random(314159265358979L); field in UnsignedLongsBenchmark
118 return RANDOM_SOURCE.nextLong(); in random()
127 long r = RANDOM_SOURCE.nextLong(); in randomDivisor()