- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for nextDouble (0.14 sec)
-
guava-tests/benchmark/com/google/common/collect/MultipleSetContainsBenchmark.java
for (int i = 0; i < 0x1000; i++) { double setSize = rng.nextDouble(); if (setSize < emptySetProportion) { sets[i] = ImmutableSet.of(); } else if (setSize < emptySetProportion + singletonSetProportion) { sets[i] = ImmutableSet.of(PRESENT); } else { sets[i] = ImmutableSet.of(PRESENT, new Object()); } if (rng.nextDouble() < hitRate) { queries[i] = PRESENT; } else {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 22 20:09:59 UTC 2024 - 2.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/MathBenchmarking.java
* result is chosen from those possibilities uniformly at random. * * <p>Zero is treated as having log2 == 0. */ static double randomDouble(int maxExponent) { double result = RANDOM_SOURCE.nextDouble(); result = Math.scalb(result, RANDOM_SOURCE.nextInt(maxExponent + 1)); return RANDOM_SOURCE.nextBoolean() ? result : -result; } /** Returns a random integer between zero and {@code MAX_EXPONENT}. */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/QuantilesAlgorithmTest.java
private double[] dataset; @Override protected void setUp() { dataset = new double[DATASET_SIZE]; for (int i = 0; i < DATASET_SIZE; i++) { dataset[i] = RNG.nextDouble(); } } public void testSingleQuantile_median() { double referenceValue = REFERENCE_ALGORITHM.singleQuantile(1, 2, dataset.clone()); for (QuantilesAlgorithm algorithm : NON_REFERENCE_ALGORITHMS) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.4K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/cache/LoadingCacheSingleThreadBenchmark.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/QuantilesAlgorithmTest.java
private double[] dataset; @Override protected void setUp() { dataset = new double[DATASET_SIZE]; for (int i = 0; i < DATASET_SIZE; i++) { dataset[i] = RNG.nextDouble(); } } public void testSingleQuantile_median() { double referenceValue = REFERENCE_ALGORITHM.singleQuantile(1, 2, dataset.clone()); for (QuantilesAlgorithm algorithm : NON_REFERENCE_ALGORITHMS) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.4K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/math/QuantilesBenchmark.java
void setUp() { Random rng = new Random(); for (int i = 0; i < 0x100; i++) { datasets[i] = new double[datasetSize]; for (int j = 0; j < datasetSize; j++) { datasets[i][j] = rng.nextDouble(); } } } private double[] dataset(int i) { // We must test on a fresh clone of the dataset each time. Doing sorts and quickselects on a
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 10 19:45:10 UTC 2022 - 3.1K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/math/QuantilesBenchmark.java
void setUp() { Random rng = new Random(); for (int i = 0; i < 0x100; i++) { datasets[i] = new double[datasetSize]; for (int j = 0; j < datasetSize; j++) { datasets[i][j] = rng.nextDouble(); } } } private double[] dataset(int i) { // We must test on a fresh clone of the dataset each time. Doing sorts and quickselects on a
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 10 19:45:10 UTC 2022 - 3.1K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/math/StatsBenchmark.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.7K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/cache/LoadingCacheSingleThreadBenchmark.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/MathBenchmarking.java
* result is chosen from those possibilities uniformly at random. * * <p>Zero is treated as having log2 == 0. */ static double randomDouble(int maxExponent) { double result = RANDOM_SOURCE.nextDouble(); result = Math.scalb(result, RANDOM_SOURCE.nextInt(maxExponent + 1)); return RANDOM_SOURCE.nextBoolean() ? result : -result; } /** Returns a random integer between zero and {@code MAX_EXPONENT}. */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.1K bytes - Viewed (0)