List of utility methods to do List Median
double | medianAbsVal(List vals) Median absolute value if (vals.isEmpty()) { return (Double.NaN); int num = vals.size(); ArrayList sorted = new ArrayList(); for (int i = 0; i < num; i++) { Double val0bj = (Double) vals.get(i); if (val0bj.isNaN()) { ... |
double | medianAbsValAboveThresh(List vals, double thresh) Return median of numbers above threshold int num = vals.size(); ArrayList above = new ArrayList(); for (int i = 0; i < num; i++) { Double valObj = (Double) vals.get(i); if (valObj.isNaN()) { return (Double.NaN); double val = Math.abs(valObj.doubleValue()); ... |
double | medianDouble(List median Double List<Double> copy = new ArrayList<Double>(vals); Collections.sort(copy); if (copy.size() % 2 == 0) { Double acc = copy.get(copy.size() / 2); acc += copy.get((copy.size() / 2) - 1); return acc / 2.0; } else { return copy.get(copy.size() / 2); ... |
double | mediane(List mediane if (liste.isEmpty()) { return 0.0; Double[] listeTriee = liste.toArray(new Double[0]); java.util.Arrays.sort(listeTriee); return listeTriee[liste.size() / 2].doubleValue(); |