Java Array Min Value min(float[] in, int[] idx)

Here you can find the source of min(float[] in, int[] idx)

Description

min

License

Apache License

Declaration

public static final float min(float[] in, int[] idx) 

Method Source Code

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

public class Main {
    public static final float min(float[] in, int[] idx) {
        float min = in[0];
        for (int i = 1; i < in.length; i++) {
            if (in[i] < min) {
                min = in[i];//from   w  ww .  j  av  a2 s  .c o  m
            }
        }
        return min;
    }

    public static final int min(int[] in) {
        int out = in[0];
        for (int i = 1; i < in.length; i++) {
            if (in[i] < out) {
                out = in[i];
            }
        }
        return out;
    }

    public static final double min(double[] in) {
        double out = in[0];
        for (int i = 1; i < in.length; i++) {
            if (in[i] < out) {
                out = in[i];
            }
        }
        return out;
    }

    public static final float min(float[] in) {
        float out = in[0];
        for (int i = 1; i < in.length; i++) {
            if (in[i] < out) {
                out = in[i];
            }
        }
        return out;
    }
}

Related

  1. min(float... values)
  2. min(float[] array)
  3. min(float[] array, float min)
  4. min(float[] floats)
  5. min(float[] ids)
  6. min(float[] numbers)
  7. min(float[] v1, float[] v2)
  8. min(float[][] a)
  9. min(float[][] originalValues, float[][] newValues, int[] indexArray, float value)