Class SparseEuclideanDistance

java.lang.Object
smile.math.distance.SparseEuclideanDistance
All Implemented Interfaces:
Serializable, ToDoubleBiFunction<SparseArray,SparseArray>, Distance<SparseArray>, Metric<SparseArray>

public class SparseEuclideanDistance extends Object implements Metric<SparseArray>
Euclidean distance on sparse arrays.
See Also:
  • 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