Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. 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)
  2. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 29.7K bytes
    - Viewed (0)
  3. 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)
  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 Apr 26 12:43:10 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/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 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.4K bytes
    - Viewed (0)
  8. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 3.1K 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. tests/test_request_body_parameters_media_type.py

    app = FastAPI()
    
    media_type = "application/vnd.api+json"
    
    
    # NOTE: These are not valid JSON:API resources
    # but they are fine for testing requestBody with custom media_type
    class Product(BaseModel):
        name: str
        price: float
    
    
    class Shop(BaseModel):
        name: str
    
    
    @app.post("/products")
    async def create_product(data: Product = Body(media_type=media_type, embed=True)):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 6.4K bytes
    - Viewed (0)
Back to top