If you want to reprint please indicate the source: http://blog.csdn.net/itas109
QQ Technology Group: 129518033
Reference:http://stackoverflow.com/questions/8093163/min-max-values-of-a-listdouble
Now there is an array of the following, with the maximum and minimum values
list<double[]> values = new arraylist<double[]> () Values.add (new double[] {12.3, 12.5, 13.8, 16.8, 20.4, 24.4 , 26.4, 26.1, 23.6, 20.3, 17.2, 13.9}); Values.add (new double[] {Ten, ten, N, N, A, (), (+), (+), (+), (+), (+), ()); VA Lues.add (New double[] {5, 5.3, 8, 9,, 9, 24.2, 6}); Values.add (new double[] {10, 11, 15, 19, 23,, 26, 25, 22, 18, 13, 10});
To find the maximum value:
Public double Listdoublearraymax (list<double[]> dataList) {Double max = double.min_value;for (double[] Ds:datalis T) {for (double d:ds) {if (d > Max) {max = D;}}} return Max;}
To find the minimum value:
Public double listdoublearraymin (list<double[]> dataList) {double min = double.max_value;for (double[] Ds:datalis T) {for (double d:ds) {if (D < min) {min = D;}}} return min;}
If you want to reprint please indicate the source: http://blog.csdn.net/itas109
QQ Technology Group: 129518033
Finding the maximum and minimum values in list<double[]> in Java