Java Euclidean Distance euclideanDistance(double[] vector)

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

Description

euclidean Distance

License

Open Source License

Declaration

private static double euclideanDistance(double[] vector) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static double euclideanDistance(double[] vector) {
        double result = 0.0;

        for (double aVector : vector) {
            result += aVector * aVector;
        }/*from w w  w .  j a  v  a 2 s. c  o  m*/

        return Math.sqrt(result);
    }
}

Related

  1. euclideanDistance(double[] a, double[] b)
  2. euclideanDistance(double[] coord1, double[] coord2)
  3. euclideanDistance(double[] data, double[] pattern)
  4. euclideanDistance(double[] l1, double[] l2, boolean weighted)
  5. euclideanDistance(double[] p, double[] q)
  6. euclideanDistance(double[] vector1, double[] vector2)
  7. euclideanDistance(float[] points, int p1, int p2, boolean isDisp, double width, double height)
  8. euclideanDistance(int i0, int j0, int i1, int j1)
  9. euclideanDistance(int startX, int startY, int startZ, int endX, int endY, int endZ)