/** * Returns the geometric mean of the entries in the input array, or * <code>Double.NaN</code> if the array is empty. * <p> * Throws <code>IllegalArgumentException</code> if the array is null.</p> * <p> * See {@link org.apache.commons.math.stat.descriptive.moment.GeometricMean} * for details on the computing algorithm.</p> * * @param values the input array * @return the geometric mean of the values or Double.NaN if the array is empty * @throws IllegalArgumentException if the array is null */ public static double geometricMean(final double[] values) { return GEOMETRIC_MEAN.evaluate(values); }
/** * Returns the geometric mean of the entries in the input array, or * <code>Double.NaN</code> if the array is empty. * <p> * Throws <code>IllegalArgumentException</code> if the array is null.</p> * <p> * See {@link org.apache.commons.math.stat.descriptive.moment.GeometricMean} * for details on the computing algorithm.</p> * * @param values the input array * @return the geometric mean of the values or Double.NaN if the array is empty * @throws IllegalArgumentException if the array is null */ public static double geometricMean(final double[] values) { return geometricMean.evaluate(values); }
/** * Returns the geometric mean of the entries in the input array, or * <code>Double.NaN</code> if the array is empty. * <p> * Throws <code>IllegalArgumentException</code> if the array is null.</p> * <p> * See {@link org.apache.commons.math.stat.descriptive.moment.GeometricMean} * for details on the computing algorithm.</p> * * @param values the input array * @return the geometric mean of the values or Double.NaN if the array is empty * @throws IllegalArgumentException if the array is null */ public static double geometricMean(final double[] values) { return GEOMETRIC_MEAN.evaluate(values); }
/** * Returns the geometric mean of the entries in the specified portion of * the input array, or <code>Double.NaN</code> if the designated subarray * is empty. * <p> * Throws <code>IllegalArgumentException</code> if the array is null.</p> * <p> * See {@link org.apache.commons.math.stat.descriptive.moment.GeometricMean} * for details on the computing algorithm.</p> * * @param values the input array * @param begin index of the first array element to include * @param length the number of elements to include * @return the geometric mean of the values or Double.NaN if length = 0 * @throws IllegalArgumentException if the array is null or the array index * parameters are not valid */ public static double geometricMean(final double[] values, final int begin, final int length) { return GEOMETRIC_MEAN.evaluate(values, begin, length); }
/** * Returns the geometric mean of the entries in the specified portion of * the input array, or <code>Double.NaN</code> if the designated subarray * is empty. * <p> * Throws <code>IllegalArgumentException</code> if the array is null.</p> * <p> * See {@link org.apache.commons.math.stat.descriptive.moment.GeometricMean} * for details on the computing algorithm.</p> * * @param values the input array * @param begin index of the first array element to include * @param length the number of elements to include * @return the geometric mean of the values or Double.NaN if length = 0 * @throws IllegalArgumentException if the array is null or the array index * parameters are not valid */ public static double geometricMean(final double[] values, final int begin, final int length) { return geometricMean.evaluate(values, begin, length); }
/** * Returns the geometric mean of the entries in the specified portion of * the input array, or <code>Double.NaN</code> if the designated subarray * is empty. * <p> * Throws <code>IllegalArgumentException</code> if the array is null.</p> * <p> * See {@link org.apache.commons.math.stat.descriptive.moment.GeometricMean} * for details on the computing algorithm.</p> * * @param values the input array * @param begin index of the first array element to include * @param length the number of elements to include * @return the geometric mean of the values or Double.NaN if length = 0 * @throws IllegalArgumentException if the array is null or the array index * parameters are not valid */ public static double geometricMean(final double[] values, final int begin, final int length) { return GEOMETRIC_MEAN.evaluate(values, begin, length); }