- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for shuffle (0.17 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) -
cmd/erasure-metadata-utils.go
return shuffledPartsMetadata } // shuffleDisks - shuffle input disks slice depending on the // erasure distribution. Return shuffled slice of disks with // their expected distribution. func shuffleDisks(disks []StorageAPI, distribution []int) (shuffledDisks []StorageAPI) { if distribution == nil { return disks } shuffledDisks = make([]StorageAPI, len(disks)) // Shuffle disks for expected distribution.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 11.7K bytes - Viewed (0) -
docs/en/docs/js/custom.js
} return true; }); } window.addEventListener("scroll", loadVisibleTermynals); createTermynals(); loadVisibleTermynals(); } function shuffle(array) { var currentIndex = array.length, temporaryValue, randomIndex; while (0 !== currentIndex) { randomIndex = Math.floor(Math.random() * currentIndex); currentIndex -= 1;
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 6.6K 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) -
guava-tests/test/com/google/common/hash/HashingTest.java
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); assertFalse(hashCode1.equals(hashCode2)); } public void testCombineUnordered_empty() { assertThrows(
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/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)