Class SparseManhattanDistance

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

public class SparseManhattanDistance extends Object implements Metric<SparseArray>
Manhattan distance, also known as L1 distance or L1 norm, is the sum of the (absolute) differences of their coordinates.
See Also:
  • Constructor Details

    • SparseManhattanDistance

      public SparseManhattanDistance()
      Constructor.
    • SparseManhattanDistance

      public SparseManhattanDistance(double[] weight)
      Constructor.
      Parameters:
      weight - the weight vector.
  • Method Details