Java Array Normalize normalizeAndInvertValues(double[] values, double maxValue, double minValue)

Here you can find the source of normalizeAndInvertValues(double[] values, double maxValue, double minValue)

Description

normalize And Invert Values

License

Open Source License

Declaration

public static void normalizeAndInvertValues(double[] values, double maxValue, double minValue) 

Method Source Code

//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*/
    }
}

Related

  1. normalize(Number[] array)
  2. normalize(String[] slist)
  3. normalize01(float[] array)
  4. normalize2(double[] x)
  5. normalize3(float[] result, float[] a)
  6. normalizeArray(double[] array)
  7. normalizeArray(double[] hist)
  8. normalizeArray(String[] raw, int expectedSize)
  9. normalizeArrays(int normalizeToLength, String[]... arraysToNormalize)