/** * Gets the median from an array of numbers. * * @param list the array of numbers * @return the median */ public static double median(final double... list) { return getStatistics(list).getPercentile(50); }
/** * Gets the median from a list of numbers. * * @param list the list of numbers * @return the median */ public static double median(final List<Double> list) { return getStatistics(list).getPercentile(50); }
/** * Gets the median from an array of numbers. * * @param list the array of numbers * * @return the median */ public static double median(final double[] list) { return getStatistics(list).getPercentile(50); }
/** * Gets the median from a list of numbers. * * @param list the list of numbers * @return the median */ public static double median(final Collection<Double> list) { return getStatistics(list).getPercentile(50); }