Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 247 for zeros (1.63 sec)

  1. android/guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

      public void testShort() {
        Sink sink = new Sink(4);
        sink.putShort((short) 0x0201);
        HashCode unused = sink.hash();
        sink.assertInvariants(2);
        sink.assertBytes(new byte[] {1, 2, 0, 0}); // padded with zeros
      }
    
      public void testInt() {
        Sink sink = new Sink(4);
        sink.putInt(0x04030201);
        HashCode unused = sink.hash();
        sink.assertInvariants(4);
        sink.assertBytes(new byte[] {1, 2, 3, 4});
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

      public void testShort() {
        Sink sink = new Sink(4);
        sink.putShort((short) 0x0201);
        HashCode unused = sink.hash();
        sink.assertInvariants(2);
        sink.assertBytes(new byte[] {1, 2, 0, 0}); // padded with zeros
      }
    
      public void testInt() {
        Sink sink = new Sink(4);
        sink.putInt(0x04030201);
        HashCode unused = sink.hash();
        sink.assertInvariants(4);
        sink.assertBytes(new byte[] {1, 2, 3, 4});
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/hash/LittleEndianByteArray.java

      static long load64Safely(byte[] input, int offset, int length) {
        long result = 0;
        // Due to the way we shift, we can stop iterating once we've run out of data, the rest
        // of the result already being filled with zeros.
    
        // This loop is critical to performance, so please check HashBenchmark if altering it.
        int limit = Math.min(length, 8);
        for (int i = 0; i < limit; i++) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 9.7K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/Multiset.java

       * @return the count of the element before the operation; possibly zero
       * @throws IllegalArgumentException if {@code count} is negative
       * @throws NullPointerException if {@code element} is null and this implementation does not permit
       *     null elements. Note that if {@code count} is zero, the implementor may optionally return
       *     zero instead.
       */
      @CanIgnoreReturnValue
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Sat Jun 17 14:40:53 GMT 2023
    - 19.7K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/math/IntMath.java

      }
    
      private static int log10Floor(int x) {
        /*
         * Based on Hacker's Delight Fig. 11-5, the two-table-lookup, branch-free implementation.
         *
         * The key idea is that based on the number of leading zeros (equivalently, floor(log2(x))), we
         * can narrow the possible floor(log10(x)) values to two. For example, if floor(log2(x)) is 6,
         * then 64 <= x < 128, so floor(log10(x)) is either 1 or 2.
         */
    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)
  6. android/guava/src/com/google/common/math/LongMath.java

      static int log10Floor(long x) {
        /*
         * Based on Hacker's Delight Fig. 11-5, the two-table-lookup, branch-free implementation.
         *
         * The key idea is that based on the number of leading zeros (equivalently, floor(log2(x))), we
         * can narrow the possible floor(log10(x)) values to two. For example, if floor(log2(x)) is 6,
         * then 64 <= x < 128, so floor(log10(x)) is either 1 or 2.
         */
    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-testlib/src/com/google/common/collect/testing/testers/CollectionRetainAllTester.java

      }
    
      // retainAll(empty)
    
      @CollectionFeature.Require(SUPPORTS_REMOVE)
      @CollectionSize.Require(ZERO)
      public void testRetainAll_emptyPreviouslyEmpty() {
        expectReturnsFalse(empty);
        expectUnchanged();
      }
    
      @CollectionFeature.Require(absent = SUPPORTS_REMOVE)
      @CollectionSize.Require(ZERO)
      public void testRetainAll_emptyPreviouslyEmptyUnsupported() {
        expectReturnsFalseOrThrows(empty);
    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)
  8. guava-tests/test/com/google/common/math/BigIntegerMathTest.java

            assertTrue(ZERO.setBit(result).compareTo(x) <= 0);
            assertTrue(ZERO.setBit(result + 1).compareTo(x) > 0);
          }
        }
      }
    
      public void testLog2Ceiling() {
        for (BigInteger x : POSITIVE_BIGINTEGER_CANDIDATES) {
          for (RoundingMode mode : asList(CEILING, UP)) {
            int result = BigIntegerMath.log2(x, mode);
            assertTrue(ZERO.setBit(result).compareTo(x) >= 0);
    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)
  9. android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java

            assertTrue(ZERO.setBit(result).compareTo(x) <= 0);
            assertTrue(ZERO.setBit(result + 1).compareTo(x) > 0);
          }
        }
      }
    
      public void testLog2Ceiling() {
        for (BigInteger x : POSITIVE_BIGINTEGER_CANDIDATES) {
          for (RoundingMode mode : asList(CEILING, UP)) {
            int result = BigIntegerMath.log2(x, mode);
            assertTrue(ZERO.setBit(result).compareTo(x) >= 0);
    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)
  10. android/guava-testlib/src/com/google/common/collect/testing/testers/ListAddAllAtIndexTester.java

      @CollectionSize.Require(absent = ZERO)
      public void testAddAllAtIndex_supportedAllPresent() {
        assertTrue(
            "addAll(n, allPresent) should return true",
            getList().addAll(0, MinimalCollection.of(e0())));
        expectAdded(0, e0());
      }
    
      @ListFeature.Require(absent = SUPPORTS_ADD_WITH_INDEX)
      @CollectionSize.Require(absent = ZERO)
      public void testAddAllAtIndex_unsupportedAllPresent() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 6.5K bytes
    - Viewed (1)
Back to top