Package org.ddogleg.nn.alg.distance
Class KdTreeEuclideanSq_F64
java.lang.Object
org.ddogleg.nn.alg.distance.KdTreeEuclideanSq_F64
- All Implemented Interfaces:
KdTreeDistance<double[]>
Euclidian squared distance
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
KdTreeEuclideanSq_F64
public KdTreeEuclideanSq_F64(int n)
-
-
Method Details
-
distance
public double distance(double[] a, double[] b) Description copied from interface:KdTreeDistance
Computes the distance between the two input points- Specified by:
distance
in interfaceKdTreeDistance<double[]>
- Parameters:
a
- pointb
- point- Returns:
- distance
-
valueAt
public double valueAt(double[] point, int index) Description copied from interface:KdTreeDistance
Returns the value of an element in the point- Specified by:
valueAt
in interfaceKdTreeDistance<double[]>
- Parameters:
point
- (Input) the pointindex
- Which element in the point is to be read- Returns:
- The value of the element in the point.
-
length
public int length()Description copied from interface:KdTreeDistance
Number of elements in the point- Specified by:
length
in interfaceKdTreeDistance<double[]>
-