Lines Matching refs:j
51 int i, j; in levenshtein() local
53 for (j = 0; j <= len2; j++) in levenshtein()
54 row1[j] = j * a; in levenshtein()
59 for (j = 0; j < len2; j++) { in levenshtein()
61 row2[j + 1] = row1[j] + s * (string1[i] != string2[j]); in levenshtein()
63 if (i > 0 && j > 0 && string1[i - 1] == string2[j] && in levenshtein()
64 string1[i] == string2[j - 1] && in levenshtein()
65 row2[j + 1] > row0[j - 1] + w) in levenshtein()
66 row2[j + 1] = row0[j - 1] + w; in levenshtein()
68 if (row2[j + 1] > row1[j + 1] + d) in levenshtein()
69 row2[j + 1] = row1[j + 1] + d; in levenshtein()
71 if (row2[j + 1] > row2[j] + a) in levenshtein()
72 row2[j + 1] = row2[j] + a; in levenshtein()