Java Array Normalize norm2DoubleArray(double[] v)

Here you can find the source of norm2DoubleArray(double[] v)

Description

norm Double Array

License

Open Source License

Declaration

public static double norm2DoubleArray(double[] v) 

Method Source Code

//package com.java2s;

public class Main {
    public static double norm2DoubleArray(double[] v) {
        double normSum = 0;
        for (double d : v) {
            normSum += d * d;//from w w  w.j  ava2s  .c  o m
        }
        return Math.sqrt(normSum);
    }
}

Related

  1. norm(float[] data)
  2. norm(int D, double vec[])
  3. norm2(double[] vec)
  4. norm2(double[] vector)
  5. norm2(double[] x)
  6. norm_variance(double[] array)
  7. norm_vec(double[] vec)
  8. normal0(double[] p1, double[] p2, double[] p3)
  9. normalCentralMoment(boolean[][] img, int p, int q)