public class LeeDistance extends java.lang.Object implements Metric<int[]>
x1x2...xn and
y1y2...yn
of equal length n over the q-ary alphabet {0, 1, ..., q-1}
of size q ≥ 2, defined as
sum min(|xi-yi|, q-|xi-yi|)
If q = 2 or q = 3 the Lee distance coincides with the Hamming distance.| Constructor and Description |
|---|
LeeDistance(int q)
Constructor with a given size q of alphabet.
|
| Modifier and Type | Method and Description |
|---|---|
double |
d(int[] x,
int[] y)
Returns the distance measure between two objects.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapply, applyAsDouble, D, D