Package org.eblocker.server.common.util
Class Levenshtein<T>
java.lang.Object
org.eblocker.server.common.util.Levenshtein<T>
Levenshtein's Distance Algorithm
Calculates the minimum edit distance between two lists (generalized from strings) including edit sequence.
This implementation distinguishes between substitutions x->y and x->x named substitution and no operation here.
Default cost functions are:
- deletion: + 1
- insertion: + 1
- substitution: + 2
- no operation: + 0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic enum -
Method Summary
Modifier and TypeMethodDescription
-
Method Details
-
distance
-