- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 21 for rng (0.25 sec)
-
android/guava-tests/benchmark/com/google/common/collect/BinaryTreeTraverserBenchmark.java
Optional<BinaryNode> createTree(int size, Random rng) { if (size == 0) { return Optional.absent(); } else { int leftChildSize = (size - 1) / 2; int rightChildSize = size - 1 - leftChildSize; return Optional.of( new BinaryNode( rng.nextInt(), createTree(leftChildSize, rng), createTree(rightChildSize, rng))); } } }, ALL_LEFT {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 4.9K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/collect/BinaryTreeTraverserBenchmark.java
Optional<BinaryNode> createTree(int size, Random rng) { if (size == 0) { return Optional.absent(); } else { int leftChildSize = (size - 1) / 2; int rightChildSize = size - 1 - leftChildSize; return Optional.of( new BinaryNode( rng.nextInt(), createTree(leftChildSize, rng), createTree(rightChildSize, rng))); } } }, ALL_LEFT {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 4.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/HashTestUtils.java
Random rng = new Random(0L); byte[] bytes = new byte[rng.nextInt(256) + 1]; rng.nextBytes(bytes); assertEquals(hashFunction.hashBytes(bytes), hashFunction.hashBytes(ByteBuffer.wrap(bytes))); } static void assertHashByteBufferExhaustsBuffer(HashFunction hashFunction) { Random rng = new Random(0L); byte[] bytes = new byte[rng.nextInt(256) + 1]; rng.nextBytes(bytes);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 25.6K bytes - Viewed (0) -
cmd/local-locker_test.go
continue } t.Run(fmt.Sprintf("%d-read", readers), func(t *testing.T) { l := newLocker() for range locks { var tmp [16]byte rng.Read(tmp[:]) res := []string{hex.EncodeToString(tmp[:])} for range readers { rng.Read(tmp[:]) ok, err := l.RLock(t.Context(), dsync.LockArgs{ UID: uuid.NewString(), Resources: res,
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 11.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/Murmur3Hash32Test.java
} @SuppressWarnings("deprecation") public void testEncodedStringInputs() { Random rng = new Random(0); for (int z = 0; z < 100; z++) { int[] codePoints = new int[rng.nextInt(8)]; for (int i = 0; i < codePoints.length; i++) { do { codePoints[i] = rng.nextInt(0x800); } while (!Character.isValidCodePoint(codePoints[i])
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 8.4K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/io/BaseEncodingBenchmark.java
private final String[] decodingInputs = new String[INPUTS_COUNT]; @BeforeExperiment public void setUp() { Random rng = new Random(); for (int i = 0; i < encodingInputs.length; i++) { encodingInputs[i] = new byte[n]; rng.nextBytes(encodingInputs[i]); decodingInputs[i] = encoding.encoding.encode(encodingInputs[i]); } } @Benchmark public int encode(int reps) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 3.2K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/math/StatsBenchmark.java
private final double[][] values = new double[0x100][]; @BeforeExperiment void setUp() { Random rng = new Random(); for (int i = 0; i < 0x100; i++) { values[i] = new double[n]; for (int j = 0; j < n; j++) { values[i][j] = rng.nextDouble(); } } } @Benchmark int meanAndVariance(int reps) { int tmp = 0;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed May 14 19:40:47 UTC 2025 - 4.7K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/collect/ComparatorDelegationOverheadBenchmark.java
@Param({"10000"}) int n; @BeforeExperiment void setUp() throws Exception { Random rng = new Random(); for (int i = 0; i < 0x100; i++) { Integer[] array = new Integer[n]; for (int j = 0; j < n; j++) { array[j] = rng.nextInt(); } inputArrays[i] = array; } } @Benchmark int arraysSortNoComparator(int reps) { int tmp = 0;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 2.6K bytes - Viewed (0) -
cmd/xl-storage-format_test.go
xl.AddVersion(fi) } // Encode all. This is used for benchmarking. enc, err := xl.AppendTo(nil) if err != nil { b.Fatal(err) } b.Logf("Serialized size: %d bytes", len(enc)) rng := rand.New(rand.NewSource(0)) dump := make([]byte, len(enc)) b.Run("UpdateObjectVersion", func(b *testing.B) { b.SetBytes(int64(size)) b.ResetTimer() b.ReportAllocs() for b.Loop() {
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 17.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/QuantilesAlgorithmTest.java
* returning more-or-less the same answers. */ @NullUnmarked public class QuantilesAlgorithmTest extends TestCase { private static final Random rng = new Random(82674067L); private static final int DATASET_SIZE = 1000; private static final double ALLOWED_ERROR = 1.0e-10; private static final QuantilesAlgorithm REFERENCE_ALGORITHM = QuantilesAlgorithm.SORTING;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Dec 28 01:26:26 UTC 2024 - 3.5K bytes - Viewed (0)