Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for Shuffle (0.21 sec)

  1. android/guava-tests/test/com/google/common/graph/GraphMutationTest.java

          assertThat(graph.edges()).isEmpty(); // no edges can remain if there's no nodes
          AbstractGraphTest.validateGraph(graph);
    
          Collections.shuffle(nodeList, gen);
          for (Integer node : nodeList) {
            assertThat(graph.addNode(node)).isTrue();
          }
          Collections.shuffle(edgeList, gen);
          for (EndpointPair<Integer> edge : edgeList) {
            assertThat(graph.putEdge(edge.nodeU(), edge.nodeV())).isTrue();
          }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Aug 18 16:17:46 GMT 2017
    - 4.2K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/graph/NetworkMutationTest.java

          AbstractNetworkTest.validateNetwork(network);
    
          Collections.shuffle(nodeList, gen);
          for (Integer node : nodeList) {
            assertThat(network.addNode(node)).isTrue();
          }
          Collections.shuffle(edgeList, gen);
          for (Object edge : edgeList) {
            assertThat(
                    network.addEdge(
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 10 19:42:18 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/CollectionBenchmarkSampleData.java

          Collections.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);
          }
        }
        Collections.shuffle(queryList, random);
        return queryList.toArray(new Element[0]);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Apr 17 15:49:06 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  4. 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) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/graph/GraphMutationTest.java

          assertThat(graph.edges()).isEmpty(); // no edges can remain if there's no nodes
          AbstractGraphTest.validateGraph(graph);
    
          Collections.shuffle(nodeList, gen);
          for (Integer node : nodeList) {
            assertThat(graph.addNode(node)).isTrue();
          }
          Collections.shuffle(edgeList, gen);
          for (EndpointPair<Integer> edge : edgeList) {
            assertThat(graph.putEdge(edge.nodeU(), edge.nodeV())).isTrue();
          }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Aug 18 16:17:46 GMT 2017
    - 4.2K bytes
    - Viewed (0)
  6. guava-tests/benchmark/com/google/common/util/concurrent/StripedBenchmark.java

        this.striped = impl.get(numStripes);
        stripes = new int[numStripes];
        for (int i = 0; i < numStripes; i++) {
          stripes[i] = i;
        }
        List<Integer> asList = Ints.asList(stripes);
        Collections.shuffle(asList, new Random(0xdeadbeef));
    
        // do bulk gets with exactly 10 keys (possibly <10 stripes) (or less if numStripes is smaller)
        bulkGetSet = ImmutableList.copyOf(limit(cycle(asList), 10));
      }
    
      @Footprint
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4K bytes
    - Viewed (0)
  7. android/guava-tests/benchmark/com/google/common/util/concurrent/StripedBenchmark.java

        this.striped = impl.get(numStripes);
        stripes = new int[numStripes];
        for (int i = 0; i < numStripes; i++) {
          stripes[i] = i;
        }
        List<Integer> asList = Ints.asList(stripes);
        Collections.shuffle(asList, new Random(0xdeadbeef));
    
        // do bulk gets with exactly 10 keys (possibly <10 stripes) (or less if numStripes is smaller)
        bulkGetSet = ImmutableList.copyOf(limit(cycle(asList), 10));
      }
    
      @Footprint
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/CollectionBenchmarkSampleData.java

          Collections.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);
          }
        }
        Collections.shuffle(queryList, random);
        return queryList.toArray(new Element[0]);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 17 15:49:06 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  9. 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(
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 26.5K bytes
    - Viewed (0)
  10. 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) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 46.8K bytes
    - Viewed (0)
Back to top