bump product version to 4.1.6.2
[LibreOffice.git] / nlpsolver / ThirdParty / EvolutionarySolver / src / net / adaptivebox / global / BasicArray.java
blob4071cf8c754019b97deba7fa7d97fa4457b36373
1 /**
2 * Description: basic operations on Arrays
4 * @ Author Create/Modi Note
5 * Xiaofeng Xie Oct. 9, 2002
7 */
9 package net.adaptivebox.global;
11 public class BasicArray {
12 public static double getMinValue(double[] v) {
13 double mv = Double.MAX_VALUE;
14 for (int i=0; i<v.length; i++) {
15 if (v[i]<mv) {
16 mv=v[i];
19 return mv;
21 public static double getMaxValue(double[] v) {
22 double mv = -Double.MAX_VALUE;
23 for (int i=0; i<v.length; i++) {
24 if (v[i]>mv) {
25 mv=v[i];
28 return mv;