Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for Partition (0.08 sec)

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

        assertEquals(1, Iterables.size(partitions));
        assertEquals(singletonList(1), partitions.iterator().next());
      }
    
      public void testPartition_view() {
        List<Integer> list = asList(1, 2);
        Iterable<List<Integer>> partitions = Iterables.partition(list, 2);
    
        // Changes before the partition is retrieved are reflected
        list.set(0, 3);
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 19:12:33 UTC 2024
    - 45K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/ListsTest.java

        List<List<Integer>> partitions = partition(source, 1);
        assertEquals(1, partitions.size());
        assertEquals(singletonList(1), partitions.get(0));
      }
    
      public void testPartition_1_2() {
        List<Integer> source = singletonList(1);
        List<List<Integer>> partitions = partition(source, 2);
        assertEquals(1, partitions.size());
        assertEquals(singletonList(1), partitions.get(0));
      }
    
      public void testPartition_2_1() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 35K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/ListsTest.java

        List<List<Integer>> partitions = partition(source, 1);
        assertEquals(1, partitions.size());
        assertEquals(singletonList(1), partitions.get(0));
      }
    
      public void testPartition_1_2() {
        List<Integer> source = singletonList(1);
        List<List<Integer>> partitions = partition(source, 2);
        assertEquals(1, partitions.size());
        assertEquals(singletonList(1), partitions.get(0));
      }
    
      public void testPartition_2_1() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 35K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/IteratorsTest.java

        Iterator<List<Integer>> partitions = Iterators.partition(source, 1);
        assertTrue(partitions.hasNext());
        assertTrue(partitions.hasNext());
        assertEquals(ImmutableList.of(1), partitions.next());
        assertFalse(partitions.hasNext());
      }
    
      public void testPartition_singleton2() {
        Iterator<Integer> source = singletonIterator(1);
        Iterator<List<Integer>> partitions = Iterators.partition(source, 2);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 54.1K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/Lists.java

       */
      public static <T extends @Nullable Object> List<List<T>> partition(List<T> list, int size) {
        checkNotNull(list);
        checkArgument(size > 0);
        return (list instanceof RandomAccess)
            ? new RandomAccessPartition<>(list, size)
            : new Partition<>(list, size);
      }
    
      private static class Partition<T extends @Nullable Object> extends AbstractList<List<T>> {
        final List<T> list;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 43.1K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/IteratorsTest.java

        Iterator<List<Integer>> partitions = Iterators.partition(source, 1);
        assertTrue(partitions.hasNext());
        assertTrue(partitions.hasNext());
        assertEquals(ImmutableList.of(1), partitions.next());
        assertFalse(partitions.hasNext());
      }
    
      public void testPartition_singleton2() {
        Iterator<Integer> source = singletonIterator(1);
        Iterator<List<Integer>> partitions = Iterators.partition(source, 2);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 54.1K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/TopKSelector.java

          }
        }
      }
    
      /**
       * Partitions the contents of buffer in the range [left, right] around the pivot element
       * previously stored in buffer[pivotValue]. Returns the new index of the pivot element,
       * pivotNewIndex, so that everything in [left, pivotNewIndex] is ≤ pivotValue and everything in
       * (pivotNewIndex, right] is greater than pivotValue.
       */
      private int partition(int left, int right, int pivotIndex) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/Iterators.java

       * @param size the desired size of each partition (the last may be smaller)
       * @return an iterator of immutable lists containing the elements of {@code iterator} divided into
       *     partitions
       * @throws IllegalArgumentException if {@code size} is nonpositive
       */
      public static <T extends @Nullable Object> UnmodifiableIterator<List<T>> partition(
          Iterator<T> iterator, int size) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 50.3K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/FluentIterableTest.java

            () -> {
              FluentIterable<Integer> unused =
                  FluentIterable.<Integer>from(asList(1, 2)).append((List<Integer>) null);
            });
      }
    
      /*
       * Tests for partition(int size) method.
       */
    
      /*
       * Tests for partitionWithPadding(int size) method.
       */
    
      public void testFilter() {
        FluentIterable<String> filtered =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 30.4K bytes
    - Viewed (0)
  10. RELEASE.md

    ## Bug Fixes and Other Changes
    
    *   `tf.data`:
    Registered: Tue Nov 05 12:39:12 UTC 2024
    - Last Modified: Tue Oct 22 14:33:53 UTC 2024
    - 735.3K bytes
    - Viewed (0)
Back to top