Java Array Min Value minValue(double[] from)

Here you can find the source of minValue(double[] from)

Description

min Value

License

Apache License

Declaration

public static double minValue(double[] from) 

Method Source Code

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

public class Main {
    public static double minValue(double[] from) {
        double result = from[0];
        for (int i = 1; i < from.length; ++i)
            if (from[i] < result)
                result = from[i];/*from  w  w w  . j  a  v a 2 s  .co m*/
        return result;
    }

    public static float minValue(float[] from) {
        float result = from[0];
        for (int i = 1; i < from.length; ++i)
            if (from[i] < result)
                result = from[i];
        return result;
    }

    public static long minValue(long[] from) {
        long result = from[0];
        for (int i = 1; i < from.length; ++i)
            if (from[i] < result)
                result = from[i];
        return result;
    }
}

Related

  1. minOfSubRange(double[] xs, int start, int end)
  2. minOverArraySubset(double[] array, Iterable subset)
  3. minPrim(final int... numbers)
  4. minsort(int[] vet1)
  5. minValue(double array[][])
  6. minValue(double[] values)
  7. minValue(double[] values)
  8. minValue(final int[] arr)
  9. minValue(float[] arr)