Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for quadratic (0.07 sec)

  1. android/guava-tests/test/com/google/common/math/QuantilesTest.java

        // Assert that the dataset contains the same elements after the in-place computation (although
        // they may be reordered). We only do this for one index rather than for all indexes, as it is
        // quite expensive (quadratic in the size of PSEUDORANDOM_DATASET).
        double[] dataset = Doubles.toArray(PSEUDORANDOM_DATASET);
        @SuppressWarnings("unused")
        double actual = percentiles().index(33).computeInPlace(dataset);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 29.7K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/math/Quantiles.java

     *
     * <h3>Performance</h3>
     *
     * <p>The average time complexity of the computation is O(N) in the size of the dataset. There is a
     * worst case time complexity of O(N^2). You are extremely unlikely to hit this quadratic case on
     * randomly ordered data (the probability decreases faster than exponentially in N), but if you are
     * passing in unsanitized user data then a malicious user could force it. A light shuffle of the
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri May 12 17:02:53 UTC 2023
    - 29.9K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/ImmutableSortedSetTest.java

        }
        for (int j = 0; j < 1000; j++) {
          builder.add(9);
        }
        ImmutableSortedSet<Integer> unused = builder.build();
        assertThat(compares[0]).isAtMost(10000);
        // hopefully something quadratic would have more digits
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 46.7K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/Lists.java

      public static <E extends @Nullable Object> CopyOnWriteArrayList<E> newCopyOnWriteArrayList(
          Iterable<? extends E> elements) {
        // We copy elements to an ArrayList first, rather than incurring the
        // quadratic cost of adding them to the COWAL directly.
        Collection<? extends E> elementsCollection =
            (elements instanceof Collection)
                ? (Collection<? extends E>) elements
                : newArrayList(elements);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 43.1K bytes
    - Viewed (0)
Back to top