Interface Distance<T>
- Type Parameters:
T- the input type of distance function.
- All Superinterfaces:
Serializable, ToDoubleBiFunction<T,T>
- All Known Subinterfaces:
Metric<T>
- All Known Implementing Classes:
ChebyshevDistance, CorrelationDistance, DynamicTimeWarping, EditDistance, EuclideanDistance, HammingDistance, JaccardDistance, JensenShannonDistance, LeeDistance, MahalanobisDistance, ManhattanDistance, MinkowskiDistance, SparseChebyshevDistance, SparseEuclideanDistance, SparseManhattanDistance, SparseMinkowskiDistance, TaxonomicDistance
An interface to calculate a distance measure between two objects. A distance
function maps pairs of points into the non-negative reals and has to satisfy
- non-negativity:
d(x, y) >= 0 - isolation:
d(x, y) = 0if and only ifx = y - symmetry:
d(x, y) = d(x, y)
|x - y| + |y - z| >= |x - z|, which is necessary for a metric.-
Method Summary
Modifier and TypeMethodDescriptiondefault doubleReturns the distance measure between two objects.default doubleapplyAsDouble(T x, T y) doubleReturns the distance measure between two objects.default MatrixReturns the pairwise distance matrix.default MatrixReturns the pairwise distance matrix.
-
Method Details
-
d
-
apply
-
applyAsDouble
- Specified by:
applyAsDoublein interfaceToDoubleBiFunction<T,T>
-
pdist
-
pdist
-