Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 867 for We (0.13 sec)

  1. guava-tests/test/com/google/common/math/BigIntegerMathTest.java

          int result = BigIntegerMath.log2(x, HALF_UP);
          BigInteger x2 = x.pow(2);
          // x^2 < 2^(2 * result + 1), or else we would have rounded up
          assertTrue(ZERO.setBit(2 * result + 1).compareTo(x2) > 0);
          // x^2 >= 2^(2 * result - 1), or else we would have rounded down
          assertTrue(result == 0 || ZERO.setBit(2 * result - 1).compareTo(x2) <= 0);
        }
      }
    
      public void testLog2HalfDown() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 28.2K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java

          int result = BigIntegerMath.log2(x, HALF_UP);
          BigInteger x2 = x.pow(2);
          // x^2 < 2^(2 * result + 1), or else we would have rounded up
          assertTrue(ZERO.setBit(2 * result + 1).compareTo(x2) > 0);
          // x^2 >= 2^(2 * result - 1), or else we would have rounded down
          assertTrue(result == 0 || ZERO.setBit(2 * result - 1).compareTo(x2) <= 0);
        }
      }
    
      public void testLog2HalfDown() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 28.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/HashBiMap.java

        public V getValue() {
          updateIndex();
          /*
           * If the entry has been removed from the map, we return null, even though that might not be a
           * valid value. That's the best we can do, short of holding a reference to the most recently
           * seen value. And while we *could* do that, we aren't required to: Map.Entry explicitly says
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 06 16:06:58 GMT 2023
    - 36.4K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/base/EquivalenceTest.java

            .addEqualityGroup(isNull)
            .addEqualityGroup(Equivalence.identity().equivalentTo("1"))
            .testEquals();
      }
    
      /*
       * We use large numbers to avoid the integer cache. Normally, we'd accomplish that merely by using
       * `new Integer` (as we do) instead of `Integer.valueOf`. However, under J2KT, `new Integer`
       * gets translated back to `Integer.valueOf` because that is the only thing J2KT can support. And
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 6.5K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionRetainAllTester.java

        expectContents();
      }
    
      // retainAll(null)
    
      /*
       * AbstractCollection fails the retainAll(null) test when the subject
       * collection is empty, but we'd still like to test retainAll(null) when we
       * can. We split the test into empty and non-empty cases. This allows us to
       * suppress only the former.
       */
    
      @CollectionFeature.Require(SUPPORTS_REMOVE)
      @CollectionSize.Require(ZERO)
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/base/Suppliers.java

          this.durationNanos = durationNanos;
        }
    
        @Override
        @ParametricNullness
        public T get() {
          // Another variant of Double Checked Locking.
          //
          // We use two volatile reads. We could reduce this to one by
          // putting our fields into a holder class, but (at least on x86)
          // the extra memory consumption and indirection are more
          // expensive than the extra volatile reads.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 15.3K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/escape/ArrayBasedUnicodeEscaper.java

        // into the range of surrogate characters, but if they do we must not test
        // any values in that range. To see why, consider the case where:
        // safeMin <= {hi,lo} <= safeMax
        // where {hi,lo} are characters forming a surrogate pair such that:
        // codePointOf(hi, lo) > safeMax
        // which would result in the surrogate pair being (wrongly) considered safe.
        // If we clip the safe range used during the per-character tests so it is
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 8.5K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/math/QuantilesAlgorithm.java

      static double select(int k, double[] array) {
        // This is basically a copy of com.google.math.Rank#select, with a small change in the method
        // signature: we make k 0-based rather than 1-based; and we drop from and to, and always work on
        // the whole array.
        int from = 0;
        int to = array.length - 1;
    
        while (true) {
          if (to <= from + 1) {
            // Two or less elements left.
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 01 16:30:37 GMT 2022
    - 7.1K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/math/QuantilesAlgorithm.java

      static double select(int k, double[] array) {
        // This is basically a copy of com.google.math.Rank#select, with a small change in the method
        // signature: we make k 0-based rather than 1-based; and we drop from and to, and always work on
        // the whole array.
        int from = 0;
        int to = array.length - 1;
    
        while (true) {
          if (to <= from + 1) {
            // Two or less elements left.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 01 16:30:37 GMT 2022
    - 7.1K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/ImmutableSetTest.java

        assertEquals(1 << 29, ImmutableSet.chooseTableSize((1 << 29) * 3 / 5));
    
        // Now we hit the cap
        assertEquals(1 << 30, ImmutableSet.chooseTableSize(1 << 29));
        assertEquals(1 << 30, ImmutableSet.chooseTableSize((1 << 30) - 1));
    
        // Now we've gone too far
        assertThrows(IllegalArgumentException.class, () -> ImmutableSet.chooseTableSize(1 << 30));
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 13.7K bytes
    - Viewed (0)
Back to top