Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for permutations (0.26 sec)

  1. guava-tests/test/com/google/common/collect/Collections2Test.java

        assertNextPermutation(newArrayList("a", "c", "b"), permutations);
        assertNextPermutation(newArrayList("b", "a", "c"), permutations);
        assertNextPermutation(newArrayList("b", "c", "a"), permutations);
        assertNextPermutation(newArrayList("c", "a", "b"), permutations);
        assertNextPermutation(newArrayList("c", "b", "a"), permutations);
        assertNoMorePermutations(permutations);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 10:16:44 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/Collections2Test.java

        assertNextPermutation(newArrayList("a", "c", "b"), permutations);
        assertNextPermutation(newArrayList("b", "a", "c"), permutations);
        assertNextPermutation(newArrayList("b", "c", "a"), permutations);
        assertNextPermutation(newArrayList("c", "a", "b"), permutations);
        assertNextPermutation(newArrayList("c", "b", "a"), permutations);
        assertNoMorePermutations(permutations);
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 10:16:44 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/Collections2.java

          int permutations = 1;
          int n = 1;
          int r = 1;
          while (n < sortedInputList.size()) {
            int comparison = comparator.compare(sortedInputList.get(n - 1), sortedInputList.get(n));
            if (comparison < 0) {
              // We move to the next non-repeated element.
              permutations = IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r));
              r = 0;
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 23.1K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/Collections2.java

          int permutations = 1;
          int n = 1;
          int r = 1;
          while (n < sortedInputList.size()) {
            int comparison = comparator.compare(sortedInputList.get(n - 1), sortedInputList.get(n));
            if (comparison < 0) {
              // We move to the next non-repeated element.
              permutations = IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r));
              r = 0;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 22.8K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/base/Utf8Test.java

      }
    
      /** Tests that round tripping of all three byte permutations work. */
      @GwtIncompatible // java.nio.charset.Charset
    
      public void testIsWellFormed_3Bytes() {
        testBytes(3, EXPECTED_THREE_BYTE_ROUNDTRIPPABLE_COUNT);
      }
    
      /**
       * Tests that round tripping of a sample of four byte permutations work. All permutations are
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/base/Utf8Test.java

      }
    
      /** Tests that round tripping of all three byte permutations work. */
      @GwtIncompatible // java.nio.charset.Charset
    
      public void testIsWellFormed_3Bytes() {
        testBytes(3, EXPECTED_THREE_BYTE_ROUNDTRIPPABLE_COUNT);
      }
    
      /**
       * Tests that round tripping of a sample of four byte permutations work. All permutations are
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/TopKSelectorTest.java

      public void testOfferedKPlusOne() {
        for (List<Integer> list : Collections2.permutations(Ints.asList(1, 2, 3, 4, 5))) {
          TopKSelector<Integer> top = TopKSelector.least(4);
          top.offerAll(list);
          assertThat(top.topK()).containsExactly(1, 2, 3, 4).inOrder();
        }
      }
    
      public void testOfferedThreeK() {
        for (List<Integer> list : Collections2.permutations(Ints.asList(1, 2, 3, 4, 5, 6))) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/TopKSelectorTest.java

      public void testOfferedKPlusOne() {
        for (List<Integer> list : Collections2.permutations(Ints.asList(1, 2, 3, 4, 5))) {
          TopKSelector<Integer> top = TopKSelector.least(4);
          top.offerAll(list);
          assertThat(top.topK()).containsExactly(1, 2, 3, 4).inOrder();
        }
      }
    
      public void testOfferedThreeK() {
        for (List<Integer> list : Collections2.permutations(Ints.asList(1, 2, 3, 4, 5, 6))) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

        }
      }
    
      public void testRemoveAt_exhaustive() {
        int size = reduceExponentIfGwt(8);
        List<Integer> expected = createOrderedList(size);
        for (Collection<Integer> perm : Collections2.permutations(expected)) {
          for (int i = 0; i < perm.size(); i++) {
            MinMaxPriorityQueue<Integer> q = MinMaxPriorityQueue.create(perm);
            q.removeAt(i);
            assertIntactUsingStartedWith(perm, q);
          }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 36.1K bytes
    - Viewed (0)
  10. guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java

      /** Non-NPE RuntimeException. */
      public static class FooException extends RuntimeException {
        private static final long serialVersionUID = 1L;
      }
    
      /**
       * Class for testing all permutations of static/non-static one-argument methods using
       * methodParameter().
       */
      @SuppressWarnings("unused") // used by reflection
      public static class OneArg {
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Nov 16 15:12:31 GMT 2023
    - 47.9K bytes
    - Viewed (0)
Back to top