Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 71 for Difference (0.21 sec)

  1. android/guava/src/com/google/common/math/LongMath.java

      public static long checkedAdd(long a, long b) {
        long result = a + b;
        checkNoOverflow((a ^ b) < 0 | (a ^ result) >= 0, "checkedAdd", a, b);
        return result;
      }
    
      /**
       * Returns the difference of {@code a} and {@code b}, provided it does not overflow.
       *
       * @throws ArithmeticException if {@code a - b} overflows in signed {@code long} arithmetic
       */
      @GwtIncompatible // TODO
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 44.6K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/math/LongMathTest.java

      @AndroidIncompatible // slow
      public void testLessThanBranchFree() {
        for (long x : ALL_LONG_CANDIDATES) {
          for (long y : ALL_LONG_CANDIDATES) {
            BigInteger difference = BigInteger.valueOf(x).subtract(BigInteger.valueOf(y));
            if (fitsInLong(difference)) {
              int expected = (x < y) ? 1 : 0;
              int actual = LongMath.lessThanBranchFree(x, y);
              assertEquals(expected, actual);
            }
          }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 04 20:15:57 GMT 2024
    - 32.5K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/SetsTest.java

                        set1.add(samples().e3());
                        Set<String> set2 = Sets.newHashSet(samples().e3());
                        return Sets.difference(set1, set2);
                      }
                    })
                .named("Sets.difference")
                .withFeatures(CollectionSize.ANY, CollectionFeature.ALLOWS_NULL_VALUES)
                .createTestSuite());
    
        suite.addTest(
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 47.9K bytes
    - Viewed (1)
  4. android/guava-testlib/src/com/google/common/collect/testing/Helpers.java

       * incorrect values. This is useful for testing methods that must treat the return value from
       * size() as a hint only.
       *
       * @param delta the difference between the true size of the collection and the values returned by
       *     the size method
       */
      public static <T extends @Nullable Object> Collection<T> misleadingSizeCollection(int delta) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 17.7K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/escape/UnicodeEscaper.java

     * resulting XML document is parsed, the parser API will return this text as the original literal
     * string {@code "Foo<Bar>"}.
     *
     * <p><b>Note:</b> This class is similar to {@link CharEscaper} but with one very important
     * difference. A CharEscaper can only process Java <a
     * href="http://en.wikipedia.org/wiki/UTF-16">UTF16</a> characters in isolation and may not cope
     * when it encounters surrogate pairs. This class facilitates the correct escaping of all Unicode
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 13.2K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/net/InetAddresses.java

       *
       * <p>For IPv4 addresses, this is identical to {@link InetAddress#getHostAddress()}, but for IPv6
       * addresses, the output follows <a href="http://tools.ietf.org/html/rfc5952">RFC 5952</a> section
       * 4. The main difference is that this method uses "::" for zero compression, while Java's version
       * uses the uncompressed form.
       *
       * <p>This method uses hexadecimal for all IPv6 addresses, including IPv4-mapped IPv6 addresses
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Dec 15 19:31:54 GMT 2023
    - 44K bytes
    - Viewed (1)
  7. guava-tests/test/com/google/common/math/QuantilesTest.java

        // array of indexes to be calculated is modified between the calls to indexes and compute: since
        // the contract is that it is snapshotted, this shouldn't make any difference to the result.
        int[] indexes = {0, 10, 5, 1, 8, 10};
        ScaleAndIndexes intermediate = Quantiles.scale(10).indexes(indexes);
        indexes[0] = 3;
        assertThat(intermediate.compute(SIXTEEN_SQUARES_DOUBLES))
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 29.7K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/math/QuantilesTest.java

        // array of indexes to be calculated is modified between the calls to indexes and compute: since
        // the contract is that it is snapshotted, this shouldn't make any difference to the result.
        int[] indexes = {0, 10, 5, 1, 8, 10};
        ScaleAndIndexes intermediate = Quantiles.scale(10).indexes(indexes);
        indexes[0] = 3;
        assertThat(intermediate.compute(SIXTEEN_SQUARES_DOUBLES))
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 29.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/Range.java

         * mix of "less than" and "greater than"). We've also switched to "strictly less than" rather
         * than "less than or equal to" because of *handwave* the difference between "endpoints of
         * inclusive ranges" and "Cuts."
         */
        if (lowerBound.compareTo(otherRange.upperBound) < 0
            && otherRange.lowerBound.compareTo(upperBound) < 0) {
    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)
  10. android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java

       *
       * <p>As we iterate from {@code 0} to {@code nThreads}, threads with an even index will call
       * {@code getUnchecked}, and threads with an odd index will call {@code get}. If the cache throws
       * exceptions, this difference may be visible in the returned List.
       */
      private static <K> List<Object> doConcurrentGet(
          final LoadingCache<K, ?> cache,
          final K key,
          int nThreads,
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 86.2K bytes
    - Viewed (0)
Back to top