public class StringSimilarityUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
cost(char[] str1,
int string1Index,
char[] str2,
int string2Index)
get cost between characters where d(i,j) = 1 if i does not equals j, 0 if
i equals j.
|
static float |
similarity(String string1,
String string2) |
static float |
similarity(String string1,
String string2,
float min) |
static int |
unnormalisedSimilarity(String string1,
String string2) |
static int |
unnormalisedSimilarity(String string1,
String string2,
float maxGap)
implements the NeedlemanWunch distance function.
|
public static int unnormalisedSimilarity(String string1, String string2, float maxGap)
maxGap - s - t - maxGap - public static final int cost(char[] str1,
int string1Index,
char[] str2,
int string2Index)
str1 - - the string1 to evaluate the coststring1Index - - the index within the string1 to teststr2 - - the string2 to evaluate the coststring2Index - - the index within the string2 to testCopyright © 2014 Molindo GmbH. All Rights Reserved.