Package org.ddogleg.clustering.misc
Class EuclideanSqArrayF64
java.lang.Object
org.ddogleg.clustering.misc.EuclideanSqArrayF64
- All Implemented Interfaces:
Serializable,PointDistance<double[]>
Returns Euclidean distance squared for double[] points.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubledistance(double[] a, double[] b) Computes the distance between the two input pointsPointDistance<double[]>Creates a new instance which has the same configuration and can be run in parallel.
-
Constructor Details
-
EuclideanSqArrayF64
public EuclideanSqArrayF64(int arrayLength)
-
-
Method Details
-
distance
public double distance(double[] a, double[] b) Description copied from interface:PointDistanceComputes the distance between the two input points- Specified by:
distancein interfacePointDistance<double[]>- Parameters:
a- pointb- point- Returns:
- distance
-
newInstanceThread
Description copied from interface:PointDistanceCreates a new instance which has the same configuration and can be run in parallel. Some components can be shared as long as they are read only and thread safe.- Specified by:
newInstanceThreadin interfacePointDistance<double[]>
-