- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 388 for random (0.09 sec)
-
android/guava-tests/test/com/google/common/math/MathBenchmarking.java
import java.math.BigInteger; import java.util.Random; /** * Utilities for benchmarks. * * <p>In many cases, we wish to vary the order of magnitude of the input as much as we want to vary * the input itself, so most methods which generate values use an exponential distribution varying * the order of magnitude of the generated values uniformly at random. * * @author Louis Wasserman */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java
sink.assertBytes(new byte[] {1, 2, 0, 0}); // padded with zeros } public void testString() { Random random = new Random(); for (int i = 0; i < 100; i++) { byte[] bytes = new byte[64]; random.nextBytes(bytes); String s = new String(bytes, UTF_16LE); // so all random strings are valid assertEquals( new Sink(4).putUnencodedChars(s).hash(),
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 8.5K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/collect/MultisetIteratorBenchmark.java
treeMultiset = TreeMultiset.create(); Random random = new Random(); int sizeRemaining = size; // TODO(kevinb): generate better test contents for multisets while (sizeRemaining > 0) { // The JVM will return interned values for small ints. Integer value = random.nextInt(1000) + 128; int count = min(random.nextInt(10) + 1, sizeRemaining); sizeRemaining -= count;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 20:24:49 UTC 2024 - 2.7K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/collect/MultisetIteratorBenchmark.java
treeMultiset = TreeMultiset.create(); Random random = new Random(); int sizeRemaining = size; // TODO(kevinb): generate better test contents for multisets while (sizeRemaining > 0) { // The JVM will return interned values for small ints. Integer value = random.nextInt(1000) + 128; int count = min(random.nextInt(10) + 1, sizeRemaining); sizeRemaining -= count;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 20:24:49 UTC 2024 - 2.7K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/math/QuantilesBenchmark.java
int datasetSize; @Param QuantilesAlgorithm algorithm; private double[][] datasets = new double[0x100][]; @BeforeExperiment 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(); } } }
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
int datasetSize; @Param QuantilesAlgorithm algorithm; private double[][] datasets = new double[0x100][]; @BeforeExperiment 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(); } } }
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/collect/MinMaxPriorityQueueBenchmark.java
private Queue<Integer> queue; private final Random random = new Random(); @BeforeExperiment 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());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Apr 19 19:24:36 UTC 2023 - 4.3K bytes - Viewed (0) -
internal/crypto/doc.go
// initialization vector (IV) and the bucket/object path. // // 1. Encrypt: // Input: ClientKey, bucket, object, metadata, object_data // - IV := Random({0,1}²⁵⁶) // - ObjectKey := SHA256(ClientKey || Random({0,1}²⁵⁶)) // - KeyEncKey := HMAC-SHA256(ClientKey, IV || 'SSE-C' || 'DAREv2-HMAC-SHA256' || bucket || '/' || object) // - SealedKey := DAREv2_Enc(KeyEncKey, ObjectKey)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Aug 26 19:52:29 UTC 2022 - 5K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/HashingTest.java
} public void testCombineOrdered_randomHashCodes() { Random random = new Random(7); List<HashCode> hashCodes = Lists.newArrayList(); for (int i = 0; i < 10; i++) { hashCodes.add(HashCode.fromLong(random.nextLong())); } HashCode hashCode1 = Hashing.combineOrdered(hashCodes); Collections.shuffle(hashCodes, random); HashCode hashCode2 = Hashing.combineOrdered(hashCodes);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 09 17:40:09 UTC 2024 - 26.3K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/cache/LoadingCacheSingleThreadBenchmark.java
// tweak this to control hit rate @Param("2.5") double concentration; Random random = new Random(); LoadingCache<Integer, Integer> cache; int max; static AtomicLong requests = new AtomicLong(0); static AtomicLong misses = new AtomicLong(0); @BeforeExperiment void setUp() { // random integers will be generated in this range, then raised to the
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.4K bytes - Viewed (0)