Package smile.math.distance
Class SparseEuclideanDistance
java.lang.Object
smile.math.distance.SparseEuclideanDistance
- All Implemented Interfaces:
Serializable
,ToDoubleBiFunction<SparseArray,
,SparseArray> Distance<SparseArray>
,Metric<SparseArray>
Euclidean distance on sparse arrays.
- See Also:
-
Constructor Summary
ConstructorDescriptionConstructor.SparseEuclideanDistance
(double[] weight) Constructor with a given weight vector. -
Method Summary
Modifier and TypeMethodDescriptiondouble
d
(SparseArray x, SparseArray y) Returns the distance measure between two objects.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface smile.math.distance.Distance
apply, applyAsDouble, D, D
-
Constructor Details
-
SparseEuclideanDistance
public SparseEuclideanDistance()Constructor. Standard (unweighted) Euclidean distance. -
SparseEuclideanDistance
public SparseEuclideanDistance(double[] weight) Constructor with a given weight vector.- Parameters:
weight
- the weight vector.
-
-
Method Details