- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 95 for nextLine (0.15 sec)
-
android/guava-tests/benchmark/com/google/common/math/LongMathBenchmark.java
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]; binomialArguments[i][0] = RANDOM_SOURCE.nextInt(MathBenchmarking.biggestBinomials[k] - k) + k; } } @Benchmark int pow(int reps) { int tmp = 0;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/MathBenchmarking.java
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}. */ static int randomExponent() { return RANDOM_SOURCE.nextInt(MAX_EXPONENT + 1); } static double randomPositiveDouble() {
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/benchmark/com/google/common/math/LessThanBenchmark.java
constant = new int[SAMPLE_SIZE]; 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;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/RandomAmountInputStream.java
super(checkNotNull(in)); this.random = checkNotNull(random); } @Override public int read(byte[] b, int off, int len) throws IOException { return super.read(b, off, random.nextInt(len) + 1); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 1.2K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/collect/HashMultisetAddPresentBenchmark.java
multisets.clear(); for (int i = 0; i < ARRAY_SIZE; i++) { HashMultiset<Integer> multiset = HashMultiset.<Integer>create(); multisets.add(multiset); queries[i] = random.nextInt(); multiset.add(queries[i]); } } @Benchmark int add(int reps) { int tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 1.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AtomicLongMapBasherTest.java
public Long call() { long threadSum = 0; for (int j = 0; j < getsPerTask; j++) { long delta = random.nextInt(deltaRange); int behavior = random.nextInt(10); switch (behavior) { case 0: map.incrementAndGet(key); threadSum++;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Feb 13 14:28:25 UTC 2024 - 4.2K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/base/AsciiBenchmark.java
char[] array = Chars.toArray(chars); this.testString = new String(array); } private char randomAlpha() { return ALPHA.charAt(random.nextInt(ALPHA.length())); } private char randomNonAlpha() { return NONALPHA.charAt(random.nextInt(NONALPHA.length())); } @Benchmark int asciiStringToUpperCase(int reps) { String string = noWorkToDo ? Ascii.toUpperCase(testString) : testString;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/RandomAmountInputStream.java
super(checkNotNull(in)); this.random = checkNotNull(random); } @Override public int read(byte[] b, int off, int len) throws IOException { return super.read(b, off, random.nextInt(len) + 1); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 1.2K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/math/DoubleMathBenchmark.java
@BeforeExperiment void setUp() { for (int i = 0; i < ARRAY_SIZE; i++) { positiveDoubles[i] = randomPositiveDouble(); doubles[i] = randomDouble(Long.SIZE); factorials[i] = RANDOM_SOURCE.nextInt(100); } } @Benchmark long log2(int reps) { long tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 2.5K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/math/IntMathRoundingBenchmark.java
for (int i = 0; i < ARRAY_SIZE; i++) { positive[i] = randomPositiveBigInteger(Integer.SIZE - 2).intValue(); nonzero[i] = randomNonZeroBigInteger(Integer.SIZE - 2).intValue(); ints[i] = RANDOM_SOURCE.nextInt(); } } @Param({"DOWN", "UP", "FLOOR", "CEILING", "HALF_EVEN", "HALF_UP", "HALF_DOWN"}) RoundingMode mode; @Benchmark int log2(int reps) { int tmp = 0;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 2.6K bytes - Viewed (0)