List of utility methods to do List Min
T | min(List min T lowest = numbers.get(0); for (T n : numbers) { if (n.doubleValue() < lowest.doubleValue()) { lowest = n; return lowest; |
T | min(List min assert !objectList.isEmpty(); if (objectList.isEmpty()) { throw new IllegalArgumentException("Number List was empty."); T min = objectList.get(0); for (int i = 1; i < objectList.size(); i++) { if (objectList.get(i).doubleValue() < min.doubleValue()) { min = objectList.get(i); ... |
double | minAbsVal(List vals) Get the minimum absolute value int num = vals.size(); double minVal = Double.POSITIVE_INFINITY; for (int i = 0; i < num; i++) { Double val0bj = (Double) vals.get(i); if (val0bj.isNaN()) { return (val0bj.doubleValue()); double val = Math.abs(val0bj.doubleValue()); ... |
int | minIndex(List Returns the index of the minimum element in the list, using the elements' natural ordering, or -1 if the list is empty. if (list.isEmpty()) return -1; if (list.size() == 1) return 0; int best = 0; for (int i = 1; i < list.size(); ++i) if (list.get(i).compareTo(list.get(best)) < 0) best = i; ... |
int | minLength(List min Length int len = Integer.MAX_VALUE; for (char[] pattern : patterns) { if (pattern.length < len) { len = pattern.length; return len; |
List | minList(Iterable Return a List containing all the elements of the specified Iterable that compare as being equal to the minimum element. return maxList(iterable, java.util.Collections.reverseOrder());
|
double[] | minmax(List Calculate the minimum and maximum values out of a list of doubles. if (values.size() == 0) { return new double[2]; double min = values.get(0); double max = min; int length = values.size(); for (int i = 1; i < length; i++) { double value = values.get(i); ... |
int | minSize(List... lists) min Size int rtn = -1; if (lists != null && lists.length > 0) { rtn = lists[0].size(); for (int i = 1; i < lists.length; i++) { int iSize = lists[i].size(); if (iSize < rtn) { rtn = iSize; return rtn; |