Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 60 for median (0.17 sec)

  1. android/guava/src/com/google/common/math/Quantiles.java

    /**
     * Provides a fluent API for calculating <a
     * href="http://en.wikipedia.org/wiki/Quantile">quantiles</a>.
     *
     * <h3>Examples</h3>
     *
     * <p>To compute the median:
     *
     * <pre>{@code
     * double myMedian = median().compute(myDataset);
     * }</pre>
     *
     * where {@link #median()} has been statically imported.
     *
     * <p>To compute the 99th percentile:
     *
     * <pre>{@code
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri May 12 17:02:53 GMT 2023
    - 29.9K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/math/QuantilesTest.java

            .of(SIXTEEN_SQUARES_MEDIAN);
      }
    
      public void testMedian_computeInPlace() {
        double[] dataset = Doubles.toArray(SIXTEEN_SQUARES_DOUBLES);
        assertThat(median().computeInPlace(dataset)).isWithin(ALLOWED_ERROR).of(SIXTEEN_SQUARES_MEDIAN);
        assertThat(dataset).usingExactEquality().containsExactlyElementsIn(SIXTEEN_SQUARES_DOUBLES);
      }
    
      public void testQuartiles_index_compute_doubleCollection() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 29.7K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/math/QuantilesTest.java

            .of(SIXTEEN_SQUARES_MEDIAN);
      }
    
      public void testMedian_computeInPlace() {
        double[] dataset = Doubles.toArray(SIXTEEN_SQUARES_DOUBLES);
        assertThat(median().computeInPlace(dataset)).isWithin(ALLOWED_ERROR).of(SIXTEEN_SQUARES_MEDIAN);
        assertThat(dataset).usingExactEquality().containsExactlyElementsIn(SIXTEEN_SQUARES_DOUBLES);
      }
    
      public void testQuartiles_index_compute_doubleCollection() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 29.7K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/math/QuantilesAlgorithm.java

              // Exactly two elements left.
              swap(array, from, to);
            }
            return array[k];
          } else {
            int midIndex = (from + to) >>> 1;
            // Choose the median of the elements at the from, to and mid indexes,
            // and rearrange so that array[from]<=array[from+1], and
            // array[to] => array[from + 1].
    
            swap(array, midIndex, from + 1);
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 01 16:30:37 GMT 2022
    - 7.1K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/math/QuantilesAlgorithm.java

              // Exactly two elements left.
              swap(array, from, to);
            }
            return array[k];
          } else {
            int midIndex = (from + to) >>> 1;
            // Choose the median of the elements at the from, to and mid indexes,
            // and rearrange so that array[from]<=array[from+1], and
            // array[to] => array[from + 1].
    
            swap(array, midIndex, from + 1);
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 01 16:30:37 GMT 2022
    - 7.1K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/math/QuantilesAlgorithmTest.java

      @Override
      protected void setUp() {
        dataset = new double[DATASET_SIZE];
        for (int i = 0; i < DATASET_SIZE; i++) {
          dataset[i] = RNG.nextDouble();
        }
      }
    
      public void testSingleQuantile_median() {
        double referenceValue = REFERENCE_ALGORITHM.singleQuantile(1, 2, dataset.clone());
        for (QuantilesAlgorithm algorithm : NON_REFERENCE_ALGORITHMS) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.4K bytes
    - Viewed (0)
  7. android/guava-tests/benchmark/com/google/common/math/QuantilesBenchmark.java

        // dataset which is already sorted or partially sorted is cheating.
        return datasets[i & 0xFF].clone();
      }
    
      @Benchmark
      double median(int reps) {
        double dummy = 0.0;
        for (int i = 0; i < reps; i++) {
          dummy += algorithm.singleQuantile(1, 2, dataset(i));
        }
        return dummy;
      }
    
      @Benchmark
      double percentile90(int reps) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 3.1K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/math/QuantilesAlgorithmTest.java

      @Override
      protected void setUp() {
        dataset = new double[DATASET_SIZE];
        for (int i = 0; i < DATASET_SIZE; i++) {
          dataset[i] = RNG.nextDouble();
        }
      }
    
      public void testSingleQuantile_median() {
        double referenceValue = REFERENCE_ALGORITHM.singleQuantile(1, 2, dataset.clone());
        for (QuantilesAlgorithm algorithm : NON_REFERENCE_ALGORITHMS) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.4K bytes
    - Viewed (0)
  9. guava-tests/benchmark/com/google/common/math/QuantilesBenchmark.java

        // dataset which is already sorted or partially sorted is cheating.
        return datasets[i & 0xFF].clone();
      }
    
      @Benchmark
      double median(int reps) {
        double dummy = 0.0;
        for (int i = 0; i < reps; i++) {
          dummy += algorithm.singleQuantile(1, 2, dataset(i));
        }
        return dummy;
      }
    
      @Benchmark
      double percentile90(int reps) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 3.1K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/base/Ascii.java

       */
      public static final byte CAN = 24;
    
      /**
       * End of Medium: A control character associated with the sent data which may be used to identify
       * the physical end of the medium, or the end of the used, or wanted, portion of information
       * recorded on a medium. (The position of this character does not necessarily correspond to the
       * physical end of the medium.)
       *
       * @since 8.0
       */
      public static final byte EM = 25;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Jul 19 15:43:07 GMT 2021
    - 21.6K bytes
    - Viewed (0)
Back to top