Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for putFloat (0.06 sec)

  1. android/guava/src/com/google/common/hash/AbstractHasher.java

      }
    
      @Override
      @CanIgnoreReturnValue
      public final Hasher putDouble(double d) {
        return putLong(Double.doubleToRawLongBits(d));
      }
    
      @Override
      @CanIgnoreReturnValue
      public final Hasher putFloat(float f) {
        return putInt(Float.floatToRawIntBits(f));
      }
    
      @Override
      @CanIgnoreReturnValue
      public Hasher putUnencodedChars(CharSequence charSequence) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jun 15 20:59:00 UTC 2022
    - 3.5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/hash/FarmHashFingerprint64Test.java

        assertEquals(hashCode, hasher.hash().asLong());
      }
    
      public void testHashFloatIsStable() {
        // Just a spot check.  Better than nothing.
        Hasher hasher = HASH_FN.newHasher();
        hasher.putFloat(0x01000101f).putFloat(0f);
        assertEquals(0x49f9d18ee8ae1b28L, hasher.hash().asLong());
    
        hasher = HASH_FN.newHasher();
        hasher.putDouble(0x0000000001000101d);
        assertEquals(0x388ee898bad75cbfL, hasher.hash().asLong());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  3. guava/src/com/google/common/hash/AbstractCompositeHashFunction.java

            for (Hasher hasher : hashers) {
              hasher.putLong(l);
            }
            return this;
          }
    
          @Override
          public Hasher putFloat(float f) {
            for (Hasher hasher : hashers) {
              hasher.putFloat(f);
            }
            return this;
          }
    
          @Override
          public Hasher putDouble(double d) {
            for (Hasher hasher : hashers) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 06 00:47:57 UTC 2021
    - 5.4K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/hash/Fingerprint2011Test.java

      }
    
      public void testHashFloatIsStable() {
        // This is about the best we can do for floating-point
        Hasher hasher = HASH_FN.newHasher();
        hasher.putFloat(0x01000101f).putFloat(0f);
        assertEquals(0x96a4f8cc6ecbf16L, hasher.hash().asLong());
    
        hasher = HASH_FN.newHasher();
        hasher.putDouble(0x0000000001000101d);
        assertEquals(0xcf54171253fdc198L, hasher.hash().asLong());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/hash/FarmHashFingerprint64Test.java

        assertEquals(hashCode, hasher.hash().asLong());
      }
    
      public void testHashFloatIsStable() {
        // Just a spot check.  Better than nothing.
        Hasher hasher = HASH_FN.newHasher();
        hasher.putFloat(0x01000101f).putFloat(0f);
        assertEquals(0x49f9d18ee8ae1b28L, hasher.hash().asLong());
    
        hasher = HASH_FN.newHasher();
        hasher.putDouble(0x0000000001000101d);
        assertEquals(0x388ee898bad75cbfL, hasher.hash().asLong());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

          assertEquals(
              new Sink(4).putUnencodedChars(s).hash(), new Sink(4).putString(s, UTF_16LE).hash());
        }
      }
    
      public void testFloat() {
        Sink sink = new Sink(4);
        sink.putFloat(Float.intBitsToFloat(0x04030201));
        HashCode unused = sink.hash();
        sink.assertInvariants(4);
        sink.assertBytes(new byte[] {1, 2, 3, 4});
      }
    
      public void testDouble() {
        Sink sink = new Sink(8);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java

              new TestHasher().putUnencodedChars(s).hash(),
              new TestHasher().putString(s, UTF_16LE).hash());
        }
      }
    
      public void testFloat() {
        TestHasher hasher = new TestHasher();
        hasher.putFloat(Float.intBitsToFloat(0x04030201));
        hasher.assertBytes(new byte[] {1, 2, 3, 4});
      }
    
      public void testDouble() {
        TestHasher hasher = new TestHasher();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java

              new TestHasher().putUnencodedChars(s).hash(),
              new TestHasher().putString(s, UTF_16LE).hash());
        }
      }
    
      public void testFloat() {
        TestHasher hasher = new TestHasher();
        hasher.putFloat(Float.intBitsToFloat(0x04030201));
        hasher.assertBytes(new byte[] {1, 2, 3, 4});
      }
    
      public void testDouble() {
        TestHasher hasher = new TestHasher();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  9. guava/src/com/google/common/hash/AbstractHasher.java

      }
    
      @Override
      @CanIgnoreReturnValue
      public final Hasher putDouble(double d) {
        return putLong(Double.doubleToRawLongBits(d));
      }
    
      @Override
      @CanIgnoreReturnValue
      public final Hasher putFloat(float f) {
        return putInt(Float.floatToRawIntBits(f));
      }
    
      @Override
      @CanIgnoreReturnValue
      public Hasher putUnencodedChars(CharSequence charSequence) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jun 15 20:59:00 UTC 2022
    - 3.5K bytes
    - Viewed (0)
  10. guava/src/com/google/common/hash/PrimitiveSink.java

      PrimitiveSink putInt(int i);
    
      /** Puts a long into this sink. */
      @CanIgnoreReturnValue
      PrimitiveSink putLong(long l);
    
      /** Puts a float into this sink. */
      @CanIgnoreReturnValue
      PrimitiveSink putFloat(float f);
    
      /** Puts a double into this sink. */
      @CanIgnoreReturnValue
      PrimitiveSink putDouble(double d);
    
      /** Puts a boolean into this sink. */
      @CanIgnoreReturnValue
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jun 15 20:59:00 UTC 2022
    - 3.9K bytes
    - Viewed (0)
Back to top