类 EuclideanDistance
- java.lang.Object
-
- org.meteoinfo.math.distance.EuclideanDistance
-
public class EuclideanDistance extends java.lang.Object- 作者:
- Yaqiang Wang
-
-
构造器概要
构造器 构造器 说明 EuclideanDistance()Constructor.EuclideanDistance(double[] weight)Constructor with a given weight vector.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 doubled(double[] x, double[] y)Euclidean distance between the two arrays of type double.doubled(float[] x, float[] y)Euclidean distance between the two arrays of type float.doubled(int[] x, int[] y)Euclidean distance between the two arrays of type integer.double[][]proximity(double[][] data, boolean half)eturns the proximity matrix of a dataset for given distance function.java.lang.StringtoString()
-
-
-
方法详细资料
-
toString
public java.lang.String toString()
- 覆盖:
toString在类中java.lang.Object
-
d
public double d(int[] x, int[] y)Euclidean distance between the two arrays of type integer. No missing value handling in this method.
-
d
public double d(float[] x, float[] y)Euclidean distance between the two arrays of type float. NaN will be treated as missing values and will be excluded from the calculation. Let m be the number nonmissing values, and n be the number of all values. The returned distance is sqrt(n * d / m), where d is the square of distance between nonmissing values.
-
d
public double d(double[] x, double[] y)Euclidean distance between the two arrays of type double. NaN will be treated as missing values and will be excluded from the calculation. Let m be the number nonmissing values, and n be the number of all values. The returned distance is sqrt(n * d / m), where d is the square of distance between nonmissing values.
-
proximity
public double[][] proximity(double[][] data, boolean half)eturns the proximity matrix of a dataset for given distance function.- 参数:
data- Input datahalf- If true, only the lower half of matrix is allocated to save space.- 返回:
- Proximity maxtrix
-
-