Lines Matching refs:costs
1030 std::vector<std::vector<double> > costs( in CalculateOptimalEdits() local
1036 for (size_t l_i = 0; l_i < costs.size(); ++l_i) { in CalculateOptimalEdits()
1037 costs[l_i][0] = static_cast<double>(l_i); in CalculateOptimalEdits()
1041 for (size_t r_i = 1; r_i < costs[0].size(); ++r_i) { in CalculateOptimalEdits()
1042 costs[0][r_i] = static_cast<double>(r_i); in CalculateOptimalEdits()
1050 costs[l_i + 1][r_i + 1] = costs[l_i][r_i]; in CalculateOptimalEdits()
1055 const double add = costs[l_i + 1][r_i]; in CalculateOptimalEdits()
1056 const double remove = costs[l_i][r_i + 1]; in CalculateOptimalEdits()
1057 const double replace = costs[l_i][r_i]; in CalculateOptimalEdits()
1059 costs[l_i + 1][r_i + 1] = add + 1; in CalculateOptimalEdits()
1062 costs[l_i + 1][r_i + 1] = remove + 1; in CalculateOptimalEdits()
1067 costs[l_i + 1][r_i + 1] = replace + 1.00001; in CalculateOptimalEdits()