Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 25 for ContiguousSet (0.27 sec)

  1. android/guava/src/com/google/common/collect/ImmutableRangeSet.java

            long total = 0;
            for (Range<C> range : ranges) {
              if (range.contains(c)) {
                return Ints.saturatedCast(total + ContiguousSet.create(range, domain).indexOf(c));
              } else {
                total += ContiguousSet.create(range, domain).size();
              }
            }
            throw new AssertionError("impossible");
          }
          return -1;
        }
    
        @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/package-info.java

     *       type.
     * </dl>
     *
     * <h2>Ranges</h2>
     *
     * <ul>
     *   <li>{@link Range}
     *   <li>{@link RangeMap}
     *   <li>{@link RangeSet}
     *   <li>{@link DiscreteDomain}
     *   <li>{@link ContiguousSet}
     * </ul>
     *
     * <h2>Classes of static utility methods</h2>
     *
     * <ul>
     *   <li>{@link Collections2}
     *   <li>{@link Comparators}
     *   <li>{@link Iterables}
     *   <li>{@link Iterators}
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Jul 06 16:29:45 GMT 2023
    - 5K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/ContiguousSetTest.java

                ContiguousSet.create(Range.open(0, 4), integers()),
                ContiguousSet.create(Range.closed(1, 3), NOT_EQUAL_TO_INTEGERS),
                ContiguousSet.create(Range.closedOpen(1, 4), NOT_EQUAL_TO_INTEGERS),
                ContiguousSet.create(Range.openClosed(0, 3), NOT_EQUAL_TO_INTEGERS),
                ContiguousSet.create(Range.open(0, 4), NOT_EQUAL_TO_INTEGERS),
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 19.1K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/ContiguousSetTest.java

                ContiguousSet.create(Range.open(0, 4), integers()),
                ContiguousSet.create(Range.closed(1, 3), NOT_EQUAL_TO_INTEGERS),
                ContiguousSet.create(Range.closedOpen(1, 4), NOT_EQUAL_TO_INTEGERS),
                ContiguousSet.create(Range.openClosed(0, 3), NOT_EQUAL_TO_INTEGERS),
                ContiguousSet.create(Range.open(0, 4), NOT_EQUAL_TO_INTEGERS),
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 19.1K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/testers/NavigableSetNavigationTester.java

      }
    
      /*
       * TODO(cpovirk): make "too small" and "too large" elements available for better navigation
       * testing. At that point, we may be able to eliminate the "hole" tests, which would mean that
       * ContiguousSet's tests would no longer need to suppress them.
       */
      @CollectionSize.Require(SEVERAL)
      public void testLower() {
        assertEquals(null, navigableSet.lower(a));
        assertEquals(a, navigableSet.lower(b));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  6. guava-tests/benchmark/com/google/common/collect/PowerSetBenchmark.java

     */
    public class PowerSetBenchmark {
      @Param({"2", "4", "8", "16"})
      int elements;
    
      Set<Set<Integer>> powerSet;
    
      @BeforeExperiment
      void setUp() {
        Set<Integer> set = ContiguousSet.create(Range.closed(1, elements), integers());
        powerSet = Sets.powerSet(set);
      }
    
      @Benchmark
      int iteration(int reps) {
        int sum = 0;
        for (int i = 0; i < reps; i++) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 1.4K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/collect/testing/testers/NavigableSetNavigationTester.java

      }
    
      /*
       * TODO(cpovirk): make "too small" and "too large" elements available for better navigation
       * testing. At that point, we may be able to eliminate the "hole" tests, which would mean that
       * ContiguousSet's tests would no longer need to suppress them.
       */
      @CollectionSize.Require(SEVERAL)
      public void testLower() {
        assertEquals(null, navigableSet.lower(a));
        assertEquals(a, navigableSet.lower(b));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/SetsTest.java

        assertThat(Sets.<Object>cartesianProduct(x, y))
            .containsExactly(exp1, exp2, exp3, exp4)
            .inOrder();
      }
    
      public void testCartesianProductTooBig() {
        Set<Integer> set = ContiguousSet.create(Range.closed(0, 10000), DiscreteDomain.integers());
        try {
          Sets.cartesianProduct(set, set, set, set, set);
          fail("Expected IAE");
        } catch (IllegalArgumentException expected) {
        }
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 49.3K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/RangeSet.java

     * be as expected on discrete ranges. See the Javadoc of those methods for details.
     *
     * <p>For a {@link Set} whose contents are specified by a {@link Range}, see {@link ContiguousSet}.
     *
     * <p>See the Guava User Guide article on <a href=
     * "https://github.com/google/guava/wiki/NewCollectionTypesExplained#rangeset">RangeSets</a>.
     *
     * @author Kevin Bourrillion
     * @author Louis Wasserman
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/BenchmarkHelpers.java

            return ImmutableSortedSet.copyOf(contents);
          }
        },
        ContiguousSetImpl {
          @Override
          public <E extends Comparable<E>> Set<E> create(Collection<E> contents) {
            return ContiguousSet.copyOf(contents);
          }
        },
        ;
      }
    
      public enum ListMultimapImpl {
        ArrayListMultimapImpl {
          @Override
          <K, V> ListMultimap<K, V> create(Multimap<K, V> contents) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Mar 04 04:06:35 GMT 2022
    - 12.3K bytes
    - Viewed (0)
Back to top