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

Class SparseManhattanDistance

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


    public class SparseManhattanDistance
    extends java.lang.Object
    implements Metric<SparseArray>, java.io.Serializable
    Manhattan distance, also known as L1 distance or L1 norm, is the sum of the (absolute) differences of their coordinates. Use getInstance() to get the standard unweighted Manhattan 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

      • SparseManhattanDistance

        public SparseManhattanDistance()
        Constructor.
      • SparseManhattanDistance

        public SparseManhattanDistance(double[] weight)
        Constructor.
        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.