Java Array Max Value maxArray(double[] input)

Here you can find the source of maxArray(double[] input)

Description

max Array

License

Apache License

Declaration

public static double maxArray(double[] input) 

Method Source Code

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

public class Main {
    public static double maxArray(double[] input) {
        assert ((input != null) && (input.length > 0)) : "Your array is empty.";

        double temp = input[0];
        for (int index = 0; index < input.length; index++)
            temp = temp < input[index] ? input[index] : temp;

        return temp;
    }//ww w . j a  v a2 s .c o  m
}

Related

  1. max_of_ints(int[] data)
  2. max_val_subsequence(int[] vals)
  3. maxAbs(double[] a, int begin, int end)
  4. maxAbs(float[] a, int off, int length)
  5. maxarr(double[] a)
  6. maxArray(int[] arr)
  7. maxBetween(int[] arr1, int[] arr2)
  8. maxbits(int[] i, int pos, int length)
  9. maxbits32(int[] i, int pos)