public class ManhattanDistance extends java.lang.Object implements Metric<double[]>, java.io.Serializable
| Constructor and Description |
|---|
ManhattanDistance()
Constructor.
|
ManhattanDistance(double[] weight)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
double |
d(double[] x,
double[] y)
Manhattan distance between two arrays of type double.
|
double |
d(float[] x,
float[] y)
Manhattan distance between two arrays of type float.
|
double |
d(int[] x,
int[] y)
Manhattan distance between two arrays of type integer.
|
java.lang.String |
toString() |
public ManhattanDistance()
public ManhattanDistance(double[] weight)
weight - the weight vector.public java.lang.String toString()
toString in class java.lang.Objectpublic double d(int[] x,
int[] y)
public double d(float[] x,
float[] y)
public double d(double[] x,
double[] y)