public class EuclideanDistance extends java.lang.Object implements Metric<double[]>, java.io.Serializable
| Constructor and Description |
|---|
EuclideanDistance()
Constructor.
|
EuclideanDistance(double[] weight)
Constructor with a given weight vector.
|
| Modifier and Type | Method and Description |
|---|---|
double |
d(double[] x,
double[] y)
Euclidean distance between the two arrays of type double.
|
double |
d(float[] x,
float[] y)
Euclidean distance between the two arrays of type float.
|
double |
d(int[] x,
int[] y)
Euclidean distance between the two arrays of type integer.
|
java.lang.String |
toString() |
public EuclideanDistance()
public EuclideanDistance(double[] weight)
weight - the weight vector.public java.lang.String toString()
toString in class java.lang.Objectpublic double d(int[] x,
int[] y)
public double d(float[] x,
float[] y)
public double d(double[] x,
double[] y)