Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. android/guava-tests/benchmark/com/google/common/math/QuantilesBenchmark.java

    import com.google.common.collect.ContiguousSet;
    import com.google.common.collect.DiscreteDomain;
    import com.google.common.collect.ImmutableSet;
    import com.google.common.collect.Range;
    import java.util.Random;
    
    /** Benchmarks some algorithms providing the same functionality as {@link Quantiles}. */
    public class QuantilesBenchmark {
    
      private static final ContiguousSet<Integer> ALL_DECILE_INDEXES =
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 3.1K bytes
    - Viewed (0)
  2. 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 Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 26.9K bytes
    - Viewed (0)
  3. 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)
  4. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 1.4K 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. android/guava/src/com/google/common/collect/Range.java

       *       other words, {@code ContiguousSet.create(a.canonical(domain), domain).equals(
       *       ContiguousSet.create(a, domain))}
       *   <li>uniqueness: unless {@code a.isEmpty()}, {@code ContiguousSet.create(a,
       *       domain).equals(ContiguousSet.create(b, domain))} implies {@code
       *       a.canonical(domain).equals(b.canonical(domain))}
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 27.8K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top