Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 155 for powers (0.06 sec)

  1. guava/src/com/google/common/math/BigIntegerMath.java

     * {@link LongMath} respectively.
     *
     * @author Louis Wasserman
     * @since 11.0
     */
    @GwtCompatible
    public final class BigIntegerMath {
      /**
       * Returns the smallest power of two greater than or equal to {@code x}. This is equivalent to
       * {@code BigInteger.valueOf(2).pow(log2(x, CEILING))}.
       *
       * @throws IllegalArgumentException if {@code x <= 0}
       * @since 20.0
       */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 18.8K bytes
    - Viewed (0)
  2. guava/src/com/google/common/math/DoubleUtils.java

      static boolean isFinite(double d) {
        return getExponent(d) <= MAX_EXPONENT;
      }
    
      static boolean isNormal(double d) {
        return getExponent(d) >= MIN_EXPONENT;
      }
    
      /*
       * Returns x scaled by a power of 2 such that it is in the range [1, 2). Assumes x is positive,
       * normal, and finite.
       */
      static double scaleNormalize(double x) {
        long significand = doubleToRawLongBits(x) & SIGNIFICAND_MASK;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Dec 21 03:10:51 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/ImmutableSet.java

        SetBuilderImpl<E> copy() {
          return this;
        }
    
        @Override
        ImmutableSet<E> build() {
          return ImmutableSet.of();
        }
      }
    
      // We use power-of-2 tables, and this is the highest int that's a power of 2
      static final int MAX_TABLE_SIZE = Ints.MAX_POWER_OF_TWO;
    
      // Represents how tightly we can pack things, as a maximum.
      private static final double DESIRED_LOAD_FACTOR = 0.7;
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 35.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/cache/Striped64.java

    @GwtIncompatible
    abstract class Striped64 extends Number {
      /*
       * This class maintains a lazily-initialized table of atomically
       * updated variables, plus an extra "base" field. The table size
       * is a power of two. Indexing uses masked per-thread hash codes.
       * Nearly all declarations in this class are package-private,
       * accessed directly by subclasses.
       *
       * Table entries are of class Cell; a variant of AtomicLong padded
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jan 15 22:17:15 UTC 2025
    - 11.4K bytes
    - Viewed (0)
  5. android/guava-tests/benchmark/com/google/common/collect/PowerSetBenchmark.java

    /**
     * Very simple powerSet iteration benchmark.
     *
     * @author Kevin Bourrillion
     */
    @NullUnmarked
    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
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/SetsTest.java

        Set<Set<Integer>> powerSet = powerSet(elements);
        assertEquals(1, powerSet.size());
        assertEquals(ImmutableSet.of(ImmutableSet.of()), powerSet);
        assertEquals(0, powerSet.hashCode());
      }
    
      public void testPowerSetContents() {
        ImmutableSet<Integer> elements = ImmutableSet.of(1, 2, 3);
        Set<Set<Integer>> powerSet = powerSet(elements);
        assertEquals(8, powerSet.size());
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 45.3K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/math/PairedStatsAccumulatorTest.java

      }
    
      public void testCountOverflow_doesNotThrow() {
        PairedStatsAccumulator accumulator = new PairedStatsAccumulator();
        accumulator.add(ONE_VALUE, OTHER_ONE_VALUE);
        for (int power = 1; power < Long.SIZE - 1; power++) {
          accumulator.addAll(accumulator.snapshot());
        }
        // Should overflow without throwing.
        accumulator.addAll(accumulator.snapshot());
        assertThat(accumulator.count()).isLessThan(0L);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 23.4K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/Hashing.java

      }
    
      private static final int MAX_TABLE_SIZE = Ints.MAX_POWER_OF_TWO;
    
      static int closedTableSize(int expectedEntries, double loadFactor) {
        // Get the recommended table size.
        // Round down to the nearest power of 2.
        expectedEntries = max(expectedEntries, 2);
        int tableSize = Integer.highestOneBit(expectedEntries);
        // Check to make sure that we will not exceed the maximum load factor.
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/base/SmallCharMatcher.java

       * can hold setSize elements with the desired load factor.
       */
      @VisibleForTesting
      static int chooseTableSize(int setSize) {
        if (setSize == 1) {
          return 2;
        }
        // Correct the size for open addressing to match desired load factor.
        // Round up to the next highest power of 2.
        int tableSize = Integer.highestOneBit(setSize - 1) << 1;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Feb 12 03:49:18 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  10. guava/src/com/google/common/math/BigDecimalMath.java

       * the least significant bit zero is chosen. (In such cases, both of the nearest representable
       * values are even integers; this method returns the one that is a multiple of a greater power of
       * two.)
       *
       * @throws ArithmeticException if {@code mode} is {@link RoundingMode#UNNECESSARY} and {@code x}
       *     is not precisely representable as a {@code double}
       * @since 30.0
       */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 3K bytes
    - Viewed (0)
Back to top