Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 68 for recompute (0.04 sec)

  1. android/guava/src/com/google/common/collect/TreeMultiset.java

          this.totalCount = elemCount + totalCount(left) + totalCount(right);
        }
    
        private void recomputeHeight() {
          this.height = 1 + max(height(left), height(right));
        }
    
        private void recompute() {
          recomputeMultiset();
          recomputeHeight();
        }
    
        private AvlNode<E> rebalance() {
          switch (balanceFactor()) {
            case -2:
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 33.8K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/base/CharMatcherTest.java

        reallyTestNoMatchThenMatch(matcher.precomputed().negate(), s);
      }
    
      private void doTestNoMatchThenMatch(CharMatcher matcher, String s) {
        reallyTestNoMatchThenMatch(matcher, s);
        reallyTestMatchThenNoMatch(matcher.negate(), s);
        reallyTestNoMatchThenMatch(matcher.precomputed(), s);
        reallyTestMatchThenNoMatch(matcher.negate().precomputed(), s);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 30.4K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/testers/MapComputeTester.java

      @MapFeature.Require({SUPPORTS_PUT, SUPPORTS_REMOVE})
      public void testCompute_absentToPresent() {
        assertEquals(
            "Map.compute(absent, functionReturningValue) should return value",
            v3(),
            getMap()
                .compute(
                    k3(),
                    (k, v) -> {
                      assertEquals(k3(), k);
                      assertNull(v);
                      return v3();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Oct 31 14:51:04 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/base/CharMatcher.java

       * memory, so it is only likely to be worthwhile if the precomputed matcher is queried very often.
       *
       * <p>This method has no effect (returns {@code this}) when called in GWT: it's unclear whether a
       * precomputed matcher is faster, but it certainly would consume more memory (which doesn't seem
       * like a worthwhile tradeoff in a browser).
       */
      public CharMatcher precomputed() {
        return Platform.precomputeCharMatcher(this);
      }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 53.9K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/base/CharMatcherTest.java

        reallyTestNoMatchThenMatch(matcher.precomputed().negate(), s);
      }
    
      private void doTestNoMatchThenMatch(CharMatcher matcher, String s) {
        reallyTestNoMatchThenMatch(matcher, s);
        reallyTestMatchThenNoMatch(matcher.negate(), s);
        reallyTestNoMatchThenMatch(matcher.precomputed(), s);
        reallyTestMatchThenNoMatch(matcher.negate().precomputed(), s);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 30.3K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/math/QuantilesTest.java

       * - median with compute taking a double-collection and with computeInPlace;
       * - quartiles with index and with indexes taking int-varargs, and with compute taking a
       *   double-collection and with computeInPlace;
       * - scale with index and with indexes taking int-varargs, and with all overloads of compute
       *   taking a double-collection and with computeInPlace;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 29.8K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/math/QuantilesTest.java

       * - median with compute taking a double-collection and with computeInPlace;
       * - quartiles with index and with indexes taking int-varargs, and with compute taking a
       *   double-collection and with computeInPlace;
       * - scale with index and with indexes taking int-varargs, and with all overloads of compute
       *   taking a double-collection and with computeInPlace;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 29.8K bytes
    - Viewed (0)
  8. android/guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java

      void pollAndAdd(int reps) {
        for (int i = 0; i < reps; i++) {
          // TODO(kevinb): precompute random #s?
          queue.add(queue.poll() ^ random.nextInt());
        }
      }
    
      @Benchmark
      void populate(int reps) {
        for (int i = 0; i < reps; i++) {
          queue.clear();
          for (int j = 0; j < size; j++) {
            // TODO(kevinb): precompute random #s?
            queue.add(random.nextInt());
          }
        }
      }
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/cache/LocalCacheMapComputeTest.java

        // b/80241237
    
        Cache<String, String> c = CacheBuilder.newBuilder().maximumSize(1).build();
    
        assertThat(c.asMap().compute("hash-1", (k, v) -> "a")).isEqualTo("a");
        assertThat(c.asMap().compute("hash-1", (k, v) -> "b")).isEqualTo("b");
        assertThat(c.asMap().compute("hash-1", (k, v) -> "c")).isEqualTo("c");
        assertThat(c.size()).isEqualTo(1);
        assertThat(c.asMap().computeIfAbsent("hash-2", k -> "")).isEqualTo("");
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Feb 12 03:49:18 UTC 2025
    - 6.4K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/math/Quantiles.java

     *
     * <h3>Examples</h3>
     *
     * <p>To compute the median:
     *
     * {@snippet :
     * double myMedian = median().compute(myDataset);
     * }
     *
     * where {@link #median()} has been statically imported.
     *
     * <p>To compute the 99th percentile:
     *
     * {@snippet :
     * double myPercentile99 = percentiles().index(99).compute(myDataset);
     * }
     *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 30.1K bytes
    - Viewed (0)
Back to top