Here you can find the source of normalizeVectorMax(double[] input)
public static void normalizeVectorMax(double[] input)
//package com.java2s; //License from project: Open Source License public class Main { public static void normalizeVectorMax(double[] input) { double max = getMax(input); int index = 0; while (index < input.length) { input[index] = input[index] / max; index++;//from w ww. ja v a2 s . c o m } } public static double getMax(double[] input) { double output = 0; for (int i = 0; i < input.length; i++) { if (input[i] > output) { output = input[i]; } } return output; } }