Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 465 for asArray (0.16 sec)

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

          assertThat(stats.count()).isEqualTo(stream(array).count());
          assertEquivalent(stats.mean(), stream(array).average().getAsDouble());
          assertEquivalent(stats.sum(), stream(array).sum());
          assertEquivalent(stats.max(), stream(array).max().getAsDouble());
          assertEquivalent(stats.min(), stream(array).min().getAsDouble());
          // static method on Stats vs on instance method on DoubleStream
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Nov 09 22:49:56 GMT 2023
    - 32.1K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/math/StatsTest.java

        assertThat(TWO_VALUES_STATS.mean()).isWithin(ALLOWED_ERROR).of(TWO_VALUES_MEAN);
        // For datasets of many double values created from an array, we test many combinations of finite
        // and non-finite values:
        for (ManyValues values : ALL_MANY_VALUES) {
          double mean = Stats.of(values.asArray()).mean();
          if (values.hasAnyNaN()) {
            assertWithMessage("mean of " + values).that(mean).isNaN();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 28.4K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/math/StatsAccumulatorTest.java

        // For datasets of many double values created from an array, we test many combinations of
        // finite and non-finite values:
        for (ManyValues values : ALL_MANY_VALUES) {
          StatsAccumulator accumulator = new StatsAccumulator();
          StatsAccumulator accumulatorByAddAllStats = new StatsAccumulator();
          accumulator.addAll(values.asArray());
          for (double value : values.asIterable()) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 36.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/math/StatsTesting.java

        ManyValues(double[] values) {
          this.values = ImmutableList.copyOf(Doubles.asList(values));
        }
    
        ImmutableList<Double> asIterable() {
          return values;
        }
    
        double[] asArray() {
          return Doubles.toArray(values);
        }
    
        boolean hasAnyPositiveInfinity() {
          return Iterables.any(values, Predicates.equalTo(POSITIVE_INFINITY));
        }
    
        boolean hasAnyNegativeInfinity() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Nov 09 22:49:56 GMT 2023
    - 23.8K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/math/StatsAccumulatorTest.java

        // For datasets of many double values created from an array, we test many combinations of
        // finite and non-finite values:
        for (ManyValues values : ALL_MANY_VALUES) {
          StatsAccumulator accumulator = new StatsAccumulator();
          StatsAccumulator accumulatorByAddAllStats = new StatsAccumulator();
          accumulator.addAll(values.asArray());
          for (double value : values.asIterable()) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 34K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/math/StatsTesting.java

        ManyValues(double[] values) {
          this.values = ImmutableList.copyOf(Doubles.asList(values));
        }
    
        ImmutableList<Double> asIterable() {
          return values;
        }
    
        double[] asArray() {
          return Doubles.toArray(values);
        }
    
        boolean hasAnyPositiveInfinity() {
          return Iterables.any(values, Predicates.equalTo(POSITIVE_INFINITY));
        }
    
        boolean hasAnyNegativeInfinity() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Nov 09 22:49:56 GMT 2023
    - 22.4K bytes
    - Viewed (0)
  7. guava-testlib/test/com/google/common/collect/testing/features/FeatureEnumTest.java

          }
          final Class<?> returnType = method.getReturnType();
          assertTrue(
              rootLocaleFormat("%s.%s() must return an array.", annotationClass, propertyName),
              returnType.isArray());
          assertSame(
              rootLocaleFormat(
                  "%s.%s() must return an array of %s.",
                  annotationClass, propertyName, annotationClass.getDeclaringClass()),
              annotationClass.getDeclaringClass(),
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.4K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/reflect/Types.java

        // TODO(user): This is not the most efficient way to handle generic
        // arrays, but is there another way to extract the array class in a
        // non-hacky way (i.e. using String value class names- "[L...")?
        return Array.newInstance(componentType, 0).getClass();
      }
    
      // TODO(benyu): Once behavior is the same for all Java versions we support, delete this.
      enum JavaVersion {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 23.1K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/testing/FreshValueGenerator.java

        if (rawType.isEnum()) {
          return pickInstance(rawType.getEnumConstants(), null);
        }
        if (type.isArray()) {
          TypeToken<?> componentType = requireNonNull(type.getComponentType());
          Object array = Array.newInstance(componentType.getRawType(), 1);
          Array.set(array, 0, generate(componentType));
          return array;
        }
        Method emptyGenerate = EMPTY_GENERATORS.get(rawType);
        if (emptyGenerate != null) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 28K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/math/QuantilesAlgorithm.java

              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);
    
            if (array[from] > array[to]) {
    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)
Back to top