final class TRStringDistance2
extends Object
| Modifier and Type | Field and Description |
|---|---|
(package private) int[][][] |
cache |
(package private) int |
n |
(package private) char[] |
sa |
| Constructor and Description |
|---|
TRStringDistance2(String target)
Optimized to run a bit faster than the static getDistance().
|
| Modifier and Type | Method and Description |
|---|---|
private static int[][] |
form(int n,
int m) |
int |
getDistance(String other)
Compute Damerau-Levenstein distance between the target string and
another string.
|
private static int |
min3(int a,
int b,
int c) |
public TRStringDistance2(String target)
public final int getDistance(String other)
private static int[][] form(int n,
int m)
private static int min3(int a,
int b,
int c)