public static double mean(final double[] values) {
		return values.length > 0 ? sum(values)/values.length : NaN;
	}
Returns a double describing the arithmetic mean of the values, or
{@link Double#NaN} if the {@code values} array is empty.

@since 4.0

@param values the values to calculate the mean of
@return the arithmetic mean of the given {@code values} or
        {@link Double#NaN} if the {@code values} array is empty
@throws NullPointerException if the given array is {@code null}.
jenetics/src/main/java/io/jenetics/stat/DoubleSummary.java