Java Array Max Value max(double[] list)

Here you can find the source of max(double[] list)

Description

max

License

Apache License

Declaration

public static double max(double[] list) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static double max(double[] list) {
        double m = Double.NEGATIVE_INFINITY;
        for (double x : list)
            m = Math.max(m, x);//from w w w  .  j  a  v a 2  s  .com
        return m;
    }

    public static double max(double[][] mat) {
        double m = Double.NEGATIVE_INFINITY;
        for (double[] list : mat)
            for (double x : list)
                m = Math.max(m, x);
        return m;
    }

    public static int max(int[] list) {
        int m = Integer.MIN_VALUE;
        for (int x : list)
            m = Math.max(m, x);
        return m;
    }
}

Related

  1. max(double[] array)
  2. max(double[] array)
  3. max(double[] array)
  4. max(double[] data)
  5. max(double[] data)
  6. max(double[] matrix)
  7. max(double[] series)
  8. max(double[] vals)
  9. max(double[] values)