Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 437 for asArray (0.49 sec)

  1. 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();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 28.4K bytes
    - Viewed (0)
  2. 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() {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Nov 09 22:49:56 UTC 2023
    - 22.4K bytes
    - Viewed (0)
  3. 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()) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 34K bytes
    - Viewed (0)
  4. guava/src/com/google/common/reflect/TypeToken.java

        }
        // array is covariant. component type is subtype, so is the array type.
        // requireNonNull is safe because we call getArraySubtype only when isArray().
        TypeToken<?> componentSubtype =
            requireNonNull(getComponentType()).getSubtype(subclassComponentType);
        @SuppressWarnings("unchecked") // component type is subtype, so is array type.
        TypeToken<? extends T> result =
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 26 21:02:13 UTC 2023
    - 53.6K bytes
    - Viewed (0)
  5. guava/src/com/google/common/base/MoreObjects.java

            return !((OptionalDouble) value).isPresent();
          } else if (value instanceof Optional) {
            return !((Optional) value).isPresent();
          } else if (value.getClass().isArray()) {
            return Array.getLength(value) == 0;
          }
          return false;
        }
    
        /**
         * Returns a string in the format specified by {@link MoreObjects#toStringHelper(Object)}.
         *
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Oct 13 14:11:58 UTC 2023
    - 15.9K bytes
    - Viewed (0)
  6. 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 {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Apr 17 16:33:44 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionToArrayTester.java

            "toArray(sameSizeE[]) should return the given array", array, collection.toArray(array));
        expectArrayContentsInOrder(getOrderedElements(), array);
      }
    
      public void testToArray_rightSizedArrayOfObject() {
        Object[] array = new Object[getNumElements()];
        assertSame(
            "toArray(sameSizeObject[]) should return the given array",
            array,
            collection.toArray(array));
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 21 16:49:06 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  8. guava/src/com/google/common/primitives/Ints.java

      public static int min(int... array) {
        checkArgument(array.length > 0);
        int min = array[0];
        for (int i = 1; i < array.length; i++) {
          if (array[i] < min) {
            min = array[i];
          }
        }
        return min;
      }
    
      /**
       * Returns the greatest value present in {@code array}.
       *
       * @param array a <i>nonempty</i> array of {@code int} values
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 15 16:12:13 UTC 2024
    - 29.9K bytes
    - Viewed (0)
  9. guava/src/com/google/common/primitives/ImmutableDoubleArray.java

      private final int end; // exclusive
    
      private ImmutableDoubleArray(double[] array) {
        this(array, 0, array.length);
      }
    
      private ImmutableDoubleArray(double[] array, int start, int end) {
        this.array = array;
        this.start = start;
        this.end = end;
      }
    
      /** Returns the number of values in this array. */
      public int length() {
        return end - start;
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri May 12 16:34:24 UTC 2023
    - 21.7K bytes
    - Viewed (0)
  10. guava/src/com/google/common/primitives/ImmutableLongArray.java

      private final int end; // exclusive
    
      private ImmutableLongArray(long[] array) {
        this(array, 0, array.length);
      }
    
      private ImmutableLongArray(long[] array, int start, int end) {
        this.array = array;
        this.start = start;
        this.end = end;
      }
    
      /** Returns the number of values in this array. */
      public int length() {
        return end - start;
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri May 12 16:34:24 UTC 2023
    - 21K bytes
    - Viewed (0)
Back to top