- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for shuffle (0.07 sec)
-
guava-tests/test/com/google/common/collect/CollectionBenchmarkSampleData.java
List<Element> tmp = Lists.newArrayList(elementsInSet); shuffle(tmp, random); queryList.addAll(tmp.subList(0, extras)); } // now add bad queries while (queryList.size() < numQueries) { Element candidate = newElement(); if (!elementsInSet.contains(candidate)) { queryList.add(candidate); } } shuffle(queryList, random); return queryList.toArray(new Element[0]); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 4.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/CollectionBenchmarkSampleData.java
List<Element> tmp = Lists.newArrayList(elementsInSet); shuffle(tmp, random); queryList.addAll(tmp.subList(0, extras)); } // now add bad queries while (queryList.size() < numQueries) { Element candidate = newElement(); if (!elementsInSet.contains(candidate)) { queryList.add(candidate); } } shuffle(queryList, random); return queryList.toArray(new Element[0]); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 4.1K bytes - Viewed (0) -
compat/maven-model-builder/src/test/java/org/apache/maven/model/building/GraphTest.java
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 2.1K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/MinimalCollection.java
private final boolean allowNulls; // Package-private so that it can be extended. MinimalCollection(Class<? super @NonNull E> type, boolean allowNulls, E... contents) { // TODO: consider making it shuffle the contents to test iteration order. this.contents = Platform.clone(contents); this.type = type; this.allowNulls = allowNulls; if (!allowNulls) { for (Object element : contents) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 3.8K bytes - Viewed (0) -
tests/tests_test.go
var err error allModels := []interface{}{&User{}, &Account{}, &Pet{}, &Company{}, &Toy{}, &Language{}, &Coupon{}, &CouponProduct{}, &Order{}, &Parent{}, &Child{}, &Tools{}} rand.Seed(time.Now().UnixNano()) rand.Shuffle(len(allModels), func(i, j int) { allModels[i], allModels[j] = allModels[j], allModels[i] }) DB.Migrator().DropTable("user_friends", "user_speaks") if err = DB.Migrator().DropTable(allModels...); err != nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Sep 30 03:21:19 UTC 2024 - 3.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java
for (int attempts = 0; attempts < reduceIterationsIfGwt(1000); attempts++) { ArrayList<Integer> elements = createOrderedList(10); shuffle(elements, random); MinMaxPriorityQueue<Integer> queue = MinMaxPriorityQueue.create(elements); shuffle(elements, random); for (Integer element : elements) { assertThat(queue.remove(element)).isTrue(); assertIntact(queue);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 35.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java
for (int attempts = 0; attempts < reduceIterationsIfGwt(1000); attempts++) { ArrayList<Integer> elements = createOrderedList(10); shuffle(elements, random); MinMaxPriorityQueue<Integer> queue = MinMaxPriorityQueue.create(elements); shuffle(elements, random); for (Integer element : elements) { assertThat(queue.remove(element)).isTrue(); assertIntact(queue);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 35.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java
return null; } }); } assertEquals(allTasks.size() + 1, barrier.getParties()); for (int i = 0; i < 1000; i++) { Collections.shuffle(allTasks); final AbstractFuture<String> future = new AbstractFuture<String>() {}; currentFuture.set(future); for (Callable<?> task : allTasks) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 47.1K bytes - Viewed (0) -
cmd/erasure.go
NextCycle: oldCache.Info.NextCycle, }, Cache: make(map[string]dataUsageEntry, len(oldCache.Cache)), } // Put all buckets into channel. bucketCh := make(chan BucketInfo, len(buckets)) // Shuffle buckets to ensure total randomness of buckets, being scanned. // Otherwise same set of buckets get scanned across erasure sets always. // at any given point in time. This allows different buckets to be scanned
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 04 22:23:33 UTC 2024 - 16.1K bytes - Viewed (0) -
cmd/global-heal.go
if len(disks) < er.setDriveCount/2 { return fmt.Errorf("not enough drives (found=%d, healing=%d, total=%d) are available to heal `%s`", len(disks), healing, er.setDriveCount, tracker.disk.String()) } rand.Shuffle(len(disks), func(i, j int) { disks[i], disks[j] = disks[j], disks[i] }) expectedDisks := len(disks)/2 + 1 fallbackDisks := disks[expectedDisks:] disks = disks[:expectedDisks]
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Oct 26 09:58:27 UTC 2024 - 16.3K bytes - Viewed (0)