提交 b888fb04 编写于 作者: C Cyrus Najmabadi

Naming

上级 60734a58
......@@ -83,8 +83,8 @@ public void Dispose()
public static bool IsCloseMatch(string originalText, string candidateText)
{
double dummy;
return IsCloseMatch(originalText, candidateText, out dummy);
double unused;
return IsCloseMatch(originalText, candidateText, out unused);
}
/// <summary>
......@@ -270,16 +270,16 @@ private static int GetEditDistanceWorker(ArraySlice<char> source, ArraySlice<cha
private static void InitializeMaxValues(int sourceLength, int targetLength, int[,] matrix)
{
var max = sourceLength + targetLength + 1;
matrix[0, 0] = max;
var infiniteCost = sourceLength + targetLength + 1;
matrix[0, 0] = infiniteCost;
for (int i = 0; i <= sourceLength; i++)
{
matrix[i + 1, 0] = max;
matrix[i + 1, 0] = infiniteCost;
}
for (int j = 0; j <= targetLength; j++)
{
matrix[0, j + 1] = max;
matrix[0, j + 1] = infiniteCost;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册