smile.math.distance
Class LeeDistance
- java.lang.Object
-
- smile.math.distance.LeeDistance
-
public class LeeDistance extends java.lang.Object implements Metric<int[]>, java.io.Serializable
In coding theory, the Lee distance is a distance between two strings x1x2...xn and y1y2...yn of equal length n over the q-ary alphabet {0,1,...,q-1} of size q ≥ 2, defined assum min(|xi-yi|, q-|xi-yi|)
If q = 2 or q = 3 the Lee distance coincides with the Hamming distance.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description LeeDistance(int q)Constructor with a given size q of alphabet.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doubled(int[] x, int[] y)Returns the distance measure between two objects.java.lang.StringtoString()
-
DataMelt 3.0 © DataMelt by jWork.ORG