Here you can find the source of normalizeAndInvertValues(double[] values, double maxValue, double minValue)
public static void normalizeAndInvertValues(double[] values, double maxValue, double minValue)
//package com.java2s; //License from project: Open Source License public class Main { public static void normalizeAndInvertValues(double[] values, double maxValue, double minValue) { for (int i = 0; i < values.length; i++) { values[i] = 1 - (values[i] - minValue) / (maxValue - minValue); }/*from ww w .j a va 2s . co m*/ } }