Java Array Normalize norm(double[] vector)

Here you can find the source of norm(double[] vector)

Description

norm

License

Open Source License

Declaration

public static double norm(double[] vector) 

Method Source Code

//package com.java2s;
//  it under the terms of the GNU Lesser General Public License as published by

public class Main {
    public static double norm(double[] vector) {
        double result = 0.0;
        for (int i = 0; i < vector.length; i++) {
            result += vector[i] * vector[i];
        }/*from  w w  w. ja va2  s . c om*/
        return result;
    }
}

Related

  1. norm(double[] a)
  2. norm(double[] a)
  3. norm(double[] array)
  4. norm(double[] data)
  5. norm(double[] v)
  6. norm(double[] vector, int n)
  7. norm(final double[] vec)
  8. norm(final double[] x)
  9. norm(float[] data)