Here you can find the source of min(final double[] vec)
Parameter | Description |
---|---|
vec | the vector. |
public static double min(final double[] vec)
//package com.java2s; //License from project: Open Source License public class Main { /**/* w w w .j a v a 2 s . c om*/ * Computes the minimum of the elements of a vector. * @param vec the vector. * @return the minimum of the elements of the vector. */ public static double min(final double[] vec) { assert vec != null; double min = vec[0]; for (double i : vec) { if (i < min) { min = i; } } return min; } }