Java Array Normalize norm(float[] data)

Here you can find the source of norm(float[] data)

Description

norm

License

LGPL

Declaration

public static double norm(float[] data) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    public static double norm(float[] data) {
        double d = 0;
        for (int i = 0; i < data.length; i++)
            d += data[i] * data[i];//  w  w  w.j  av a 2 s.  c o m
        return Math.sqrt(d);
    }
}

Related

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