- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 115 for nextInt (0.12 sec)
-
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) -
android/guava-tests/benchmark/com/google/common/collect/BinaryTreeTraverserBenchmark.java
new BinaryNode( rng.nextInt(), createTree(leftChildSize, rng), createTree(rightChildSize, rng))); } } }, ALL_LEFT { @Override Optional<BinaryNode> createTree(int size, Random rng) { Optional<BinaryNode> root = Optional.absent(); for (int i = 0; i < size; i++) { root = Optional.of(new BinaryNode(rng.nextInt(), root, Optional.<BinaryNode>absent())); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Feb 26 19:18:53 UTC 2019 - 4.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/graph/GraphMutationTest.java
assertThat(graph.nodes()).isEmpty(); assertThat(graph.edges()).isEmpty(); AbstractGraphTest.validateGraph(graph); while (graph.nodes().size() < NUM_NODES) { graph.addNode(gen.nextInt(NODE_POOL_SIZE)); } ArrayList<Integer> nodeList = new ArrayList<>(graph.nodes()); while (graph.edges().size() < NUM_EDGES) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Aug 18 16:17:46 UTC 2017 - 4.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/ConcurrentHashMultisetBasherTest.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 5.9K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java
void setUp() { queue = heap.create(comparator.get()); for (int i = 0; i < size; i++) { queue.add(random.nextInt()); } } @Benchmark void pollAndAdd(int reps) { for (int i = 0; i < reps; i++) { // TODO(kevinb): precompute random #s? queue.add(queue.poll() ^ random.nextInt()); } } @Benchmark void populate(int reps) { for (int i = 0; i < reps; i++) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Apr 19 19:24:36 UTC 2023 - 4.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/ImmutableDoubleArrayTest.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 18:05:56 UTC 2024 - 21.2K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/math/IntMathBenchmark.java
exponent[i] = randomExponent(); factorial[i] = RANDOM_SOURCE.nextInt(50); binomial[i] = RANDOM_SOURCE.nextInt(factorial[i] + 1); positive[i] = randomPositiveBigInteger(Integer.SIZE - 1).intValue(); nonnegative[i] = randomNonNegativeBigInteger(Integer.SIZE - 1).intValue(); ints[i] = RANDOM_SOURCE.nextInt(); } } @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.2K bytes - Viewed (0) -
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) -
guava-tests/test/com/google/common/graph/NetworkMutationTest.java
assertThat(network.nodes()).isEmpty(); assertThat(network.edges()).isEmpty(); AbstractNetworkTest.validateNetwork(network); while (network.nodes().size() < NUM_NODES) { network.addNode(gen.nextInt(NODE_POOL_SIZE)); } ArrayList<Integer> nodeList = new ArrayList<>(network.nodes()); for (int i = 0; i < NUM_EDGES; ++i) { // Parallel edges are allowed, so this should always succeed.
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Apr 10 19:42:18 UTC 2024 - 4.5K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/collect/BinaryTreeTraverserBenchmark.java
new BinaryNode( rng.nextInt(), createTree(leftChildSize, rng), createTree(rightChildSize, rng))); } } }, ALL_LEFT { @Override Optional<BinaryNode> createTree(int size, Random rng) { Optional<BinaryNode> root = Optional.absent(); for (int i = 0; i < size; i++) { root = Optional.of(new BinaryNode(rng.nextInt(), root, Optional.<BinaryNode>absent())); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Feb 26 19:18:53 UTC 2019 - 4.9K bytes - Viewed (0)