Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 54 for unsigned (0.15 sec)

  1. android/guava-tests/test/com/google/common/primitives/UnsignedIntsTest.java

        assertThat(UnsignedInts.saturatedCast(Long.MIN_VALUE)).isEqualTo(LEAST);
      }
    
      public void testToLong() {
        for (long a : UNSIGNED_INTS) {
          assertThat(UnsignedInts.toLong((int) a)).isEqualTo(a);
        }
      }
    
      public void testCompare() {
        for (long a : UNSIGNED_INTS) {
          for (long b : UNSIGNED_INTS) {
            int cmpAsLongs = Longs.compare(a, b);
            int cmpAsUInt = UnsignedInts.compare((int) a, (int) b);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 06 16:10:08 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/primitives/UnsignedIntsTest.java

        assertThat(UnsignedInts.saturatedCast(Long.MIN_VALUE)).isEqualTo(LEAST);
      }
    
      public void testToLong() {
        for (long a : UNSIGNED_INTS) {
          assertThat(UnsignedInts.toLong((int) a)).isEqualTo(a);
        }
      }
    
      public void testCompare() {
        for (long a : UNSIGNED_INTS) {
          for (long b : UNSIGNED_INTS) {
            int cmpAsLongs = Longs.compare(a, b);
            int cmpAsUInt = UnsignedInts.compare((int) a, (int) b);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 16:10:08 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/RegularImmutableMap.java

        Builder.DuplicateKey duplicateKey = null;
        if (tableSize <= BYTE_MAX_SIZE) {
          /*
           * Use 8 bits per entry. The value is unsigned to allow use up to a size of 2^8.
           *
           * The absent indicator of -1 signed becomes 2^8 - 1 unsigned, which reduces the actual max
           * size to 2^8 - 1. However, due to a load factor < 1 the limit is never approached.
           */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 15 22:32:14 GMT 2024
    - 22.7K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/primitives/UnsignedInts.java

       * 0} and {@code 2^32 - 1} inclusive.
       *
       * <p><b>Java 8+ users:</b> use {@link Integer#compareUnsigned(int, int)} instead.
       *
       * @param a the first unsigned {@code int} to compare
       * @param b the second unsigned {@code int} to compare
       * @return a negative value if {@code a} is less than {@code b}; a positive value if {@code a} is
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/primitives/UnsignedBytes.java

      /**
       * The largest power of two that can be represented as an unsigned {@code byte}.
       *
       * @since 10.0
       */
      public static final byte MAX_POWER_OF_TWO = (byte) 0x80;
    
      /**
       * The largest value that fits into an unsigned byte.
       *
       * @since 13.0
       */
      public static final byte MAX_VALUE = (byte) 0xFF;
    
      private static final int UNSIGNED_MASK = 0xFF;
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 18.3K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/math/LongMath.java

            long cmp = MAX_POWER_OF_SQRT2_UNSIGNED >>> leadingZeros;
            // floor(2^(logFloor + 0.5))
            int logFloor = (Long.SIZE - 1) - leadingZeros;
            return logFloor + lessThanBranchFree(cmp, x);
        }
        throw new AssertionError("impossible");
      }
    
      /** The biggest half power of two that fits into an unsigned long */
    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)
  7. android/guava/src/com/google/common/math/IntMath.java

            int cmp = MAX_POWER_OF_SQRT2_UNSIGNED >>> leadingZeros;
            // floor(2^(logFloor + 0.5))
            int logFloor = (Integer.SIZE - 1) - leadingZeros;
            return logFloor + lessThanBranchFree(cmp, x);
    
          default:
            throw new AssertionError();
        }
      }
    
      /** The biggest half power of two that can fit in an unsigned int. */
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/primitives/Bytes.java

    /**
     * Static utility methods pertaining to {@code byte} primitives, that are not already found in
     * either {@link Byte} or {@link Arrays}, <i>and interpret bytes as neither signed nor unsigned</i>.
     * The methods which specifically treat bytes as signed or unsigned are found in {@link SignedBytes}
     * and {@link UnsignedBytes}.
     *
     * <p>See the Guava User Guide article on <a
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/primitives/UnsignedLongs.java

       * longs, that is, {@code a <= b} as unsigned longs if and only if {@code flip(a) <= flip(b)} as
       * signed longs.
       */
      private static long flip(long a) {
        return a ^ Long.MIN_VALUE;
      }
    
      /**
       * Compares the two specified {@code long} values, treating them as unsigned values between {@code
       * 0} and {@code 2^64 - 1} inclusive.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 17.6K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/hash/Hashing.java

       *
       * <p>This is designed for generating persistent fingerprints of strings. It isn't
       * cryptographically secure, but it produces a high-quality hash with few collisions. Fingerprints
       * generated using this are byte-wise identical to those created using the C++ version, but note
       * that this uses unsigned integers (see {@link com.google.common.primitives.UnsignedInts}).
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 09 00:37:15 GMT 2024
    - 29.2K bytes
    - Viewed (0)
Back to top