Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for bitCount (0.21 sec)

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

       *
       * @since 22.0
       */
      public long approximateElementCount() {
        long bitSize = bits.bitSize();
        long bitCount = bits.bitCount();
    
        /**
         * Each insertion is expected to reduce the # of clear bits by a factor of
         * `numHashFunctions/bitSize`. So, after n insertions, expected bitCount is `bitSize * (1 - (1 -
         * numHashFunctions/bitSize)^n)`. Solving that for n, and approximating `ln x` as `x - 1` when x
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 23.1K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/math/LongMathTest.java

      public void testIsPowerOfTwo() {
        for (long x : ALL_LONG_CANDIDATES) {
          // Checks for a single bit set.
          BigInteger bigX = BigInteger.valueOf(x);
          boolean expected = (bigX.signum() > 0) && (bigX.bitCount() == 1);
          assertEquals(expected, LongMath.isPowerOfTwo(x));
        }
      }
    
      public void testLog2ZeroAlwaysThrows() {
        for (RoundingMode mode : ALL_ROUNDING_MODES) {
          try {
    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. guava-tests/test/com/google/common/math/LongMathTest.java

      public void testIsPowerOfTwo() {
        for (long x : ALL_LONG_CANDIDATES) {
          // Checks for a single bit set.
          BigInteger bigX = BigInteger.valueOf(x);
          boolean expected = (bigX.signum() > 0) && (bigX.bitCount() == 1);
          assertEquals(expected, LongMath.isPowerOfTwo(x));
        }
      }
    
      public void testLog2ZeroAlwaysThrows() {
        for (RoundingMode mode : ALL_ROUNDING_MODES) {
          try {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 20:15:57 GMT 2024
    - 32.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/Sets.java

              }
              remainingSetBits &= ~(1 << index);
              return elements.get(index);
            }
          };
        }
    
        @Override
        public int size() {
          return Integer.bitCount(mask);
        }
    
        @Override
        public boolean contains(@CheckForNull Object o) {
          Integer index = inputSet.get(o);
          return index != null && (mask & (1 << index)) != 0;
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 77.4K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/Cache.kt

          // If this is a conditional request, we'll increment hitCount if/when it hits.
          networkCount++
        } else if (cacheStrategy.cacheResponse != null) {
          // This response uses the cache and not the network. That's a cache hit.
          hitCount++
        }
      }
    
      @Synchronized internal fun trackConditionalCacheHit() {
        hitCount++
      }
    
      @Synchronized fun networkCount(): Int = networkCount
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/CacheTest.kt

        assertThat(cache.networkCount()).isEqualTo(1)
        assertThat(cache.hitCount()).isEqualTo(0)
        assertThat(get(server.url("/")).body.string()).isEqualTo("B")
        assertThat(get(server.url("/")).body.string()).isEqualTo("C")
        assertThat(cache.requestCount()).isEqualTo(3)
        assertThat(cache.networkCount()).isEqualTo(3)
        assertThat(cache.hitCount()).isEqualTo(0)
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

        assertThat(cache.networkCount()).isEqualTo(1)
        assertThat(cache.hitCount()).isEqualTo(0)
        val call2 = client.newCall(Request(server.url("/")))
        val response2 = call2.execute()
        assertThat(response2.body.string()).isEqualTo("A")
        assertThat(cache.requestCount()).isEqualTo(2)
        assertThat(cache.networkCount()).isEqualTo(2)
        assertThat(cache.hitCount()).isEqualTo(1)
      }
    
      @ParameterizedTest
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        val maxSize: Long = cache.maxSize()
        cache.flush()
        cache.close()
        val directory: File = cache.directory
        val networkCount: Int = cache.networkCount()
        val hitCount: Int = cache.hitCount()
        val requestCount: Int = cache.requestCount()
      }
    
      @Test
      fun cacheControl() {
        val cacheControl: CacheControl = CacheControl.Builder().build()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
  9. okhttp/api/okhttp.api

    	public fun close ()V
    	public final fun delete ()V
    	public final fun directory ()Ljava/io/File;
    	public final fun directoryPath ()Lokio/Path;
    	public final fun evictAll ()V
    	public fun flush ()V
    	public final fun hitCount ()I
    	public final fun initialize ()V
    	public final fun isClosed ()Z
    	public static final fun key (Lokhttp3/HttpUrl;)Ljava/lang/String;
    	public final fun maxSize ()J
    	public final fun networkCount ()I
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 70.2K bytes
    - Viewed (0)
  10. RELEASE.md

    *   Fixes a null dereference on ParallelConcat with XLA [CVE-2023-25676](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-25676)
    *   Fixes a segfault in Bincount with XLA [CVE-2023-25675](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-25675)
    *   Fixes an NPE in RandomShuffle with XLA enable [CVE-2023-25674](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-25674)
    Plain Text
    - Registered: Tue May 07 12:40:20 GMT 2024
    - Last Modified: Mon Apr 29 19:17:57 GMT 2024
    - 727.7K bytes
    - Viewed (8)
Back to top