Class Levenshtein<T>

java.lang.Object
org.eblocker.server.common.util.Levenshtein<T>

public class Levenshtein<T> extends Object
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