Documentation of 'smile.math.distance.SparseEuclideanDistance' Java class
SparseEuclideanDistance
smile.math.distance

Class SparseEuclideanDistance

  • All Implemented Interfaces:
    java.io.Serializable, Distance<SparseArray>, Metric<SparseArray>


    public class SparseEuclideanDistance
    extends java.lang.Object
    implements Metric<SparseArray>, java.io.Serializable
    Euclidean distance. Use getInstance() to get the standard unweighted Euclidean distance. Or create an instance with a specified weight vector. For float or double arrays, missing values (i.e. NaN) are also handled. Also support sparse arrays of which zeros are excluded to save space.
    See Also:
    Serialized Form
    • Constructor Detail

      • 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 Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.