- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 334 for randomOp (0.08 sec)
-
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/io/RandomAmountInputStream.java
import java.io.IOException; import java.io.InputStream; import java.util.Random; /** Returns a random portion of the requested bytes on each call. */ class RandomAmountInputStream extends FilterInputStream { private final Random random; public RandomAmountInputStream(InputStream in, Random random) { super(checkNotNull(in)); this.random = checkNotNull(random); } @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 1.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java
long seed = new Random().nextLong(); Random random = new Random(seed); insertRandomly(elements, q, random); return seed; } private static void insertRandomly( ArrayList<Integer> elements, MinMaxPriorityQueue<Integer> q, Random random) { while (!elements.isEmpty()) { int selectedIndex = random.nextInt(elements.size());
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/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) -
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) -
guava-tests/benchmark/com/google/common/base/AsciiBenchmark.java
@Param({"20", "2000"}) int size; @Param({"2", "20"}) int nonAlphaRatio; // one non-alpha char per this many chars @Param boolean noWorkToDo; Random random; String testString; @BeforeExperiment void setUp() { random = new Random(0xdeadbeef); // fix the seed so results are comparable across runs int nonAlpha = size / nonAlphaRatio; int alpha = size - nonAlpha;
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/benchmark/com/google/common/collect/BinaryTreeTraverserBenchmark.java
} return root; } }, RANDOM { /** * Generates a tree with topology selected uniformly at random from the topologies of binary * trees of the specified size. */ @Override Optional<BinaryNode> createTree(int size, Random rng) { int[] keys = new int[size]; for (int i = 0; i < size; i++) {
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/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)