- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 111 for nextUint (2.81 sec)
-
src/encoding/gob/decoder.go
func toInt(x uint64) int64 { i := int64(x >> 1) if x&1 != 0 { i = ^i } return i } func (dec *Decoder) nextInt() int64 { n, _, err := decodeUintReader(&dec.buf, dec.countBuf) if err != nil { dec.err = err } return toInt(n) } func (dec *Decoder) nextUint() uint64 { n, _, err := decodeUintReader(&dec.buf, dec.countBuf) if err != nil { dec.err = err } return n }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 19:04:28 UTC 2023 - 7.2K bytes - Viewed (0) -
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: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Oct 10 19:45:10 UTC 2022 - 25.3K 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: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Feb 26 19:18:53 UTC 2019 - 4.9K bytes - Viewed (0) -
platforms/software/dependency-management/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/resolveengine/excludes/simple/DefaultCompositeExcludeTest.groovy
FACTORY.moduleSet((0..(1 + random.nextInt(5))).collect { randomModuleName() } as Set<String>) } GroupSetExclude nextGroupSet() { FACTORY.groupSet((0..(1 + random.nextInt(5))).collect { randomGroupName() } as Set<String>) } ModuleIdSetExclude nextModuleIdSet() { FACTORY.moduleIdSet((0..(1 + random.nextInt(5))).collect { randomModuleId() } as Set<ModuleIdentifier>) }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Oct 10 21:10:11 UTC 2023 - 5.8K 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: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Fri Aug 18 16:17:46 UTC 2017 - 4.2K 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: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Apr 19 19:24:36 UTC 2023 - 4.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AtomicLongMapTest.java
assertEquals(-1L, map.get(key)); } public void testAddAndGet() { AtomicLongMap<String> map = AtomicLongMap.create(); String key = "key"; long addend = random.nextInt(MAX_ADDEND); for (int i = 0; i < ITERATIONS; i++) { long before = map.get(key); long result = map.addAndGet(key, addend); long after = map.get(key); assertEquals(before + addend, after);
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Feb 13 14:28:25 UTC 2024 - 17.4K 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: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.2K bytes - Viewed (0) -
maven-core/src/test/java/org/apache/maven/settings/SettingsUtilsTest.java
.build(); Map<String, String> props = new HashMap<>(); int count = entropy.nextInt(10); for (int i = 0; i < count; i++) { props.put("name" + Long.toHexString(entropy.nextLong()), "value" + Long.toHexString(entropy.nextLong())); } count = entropy.nextInt(3); List<Repository> repos = new ArrayList<>(); for (int i = 0; i < count; i++) {
Registered: Wed Jun 12 09:55:16 UTC 2024 - Last Modified: Mon Mar 25 10:50:01 UTC 2024 - 6.7K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/math/BigIntegerMathBenchmark.java
int factorialBound; @BeforeExperiment void setUp() { for (int i = 0; i < ARRAY_SIZE; i++) { factorials[i] = RANDOM_SOURCE.nextInt(factorialBound); slowFactorials[i] = RANDOM_SOURCE.nextInt(factorialBound); binomials[i] = RANDOM_SOURCE.nextInt(factorials[i] + 1); } } /** Previous version of BigIntegerMath.factorial, kept for timing purposes. */
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.3K bytes - Viewed (0)