• Home
  • Raw
  • Download

Lines Matching refs:r_i

1041   for (size_t r_i = 1; r_i < costs[0].size(); ++r_i) {  in CalculateOptimalEdits()  local
1042 costs[0][r_i] = static_cast<double>(r_i); in CalculateOptimalEdits()
1043 best_move[0][r_i] = kAdd; in CalculateOptimalEdits()
1047 for (size_t r_i = 0; r_i < right.size(); ++r_i) { in CalculateOptimalEdits() local
1048 if (left[l_i] == right[r_i]) { in CalculateOptimalEdits()
1050 costs[l_i + 1][r_i + 1] = costs[l_i][r_i]; in CalculateOptimalEdits()
1051 best_move[l_i + 1][r_i + 1] = kMatch; 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()
1060 best_move[l_i + 1][r_i + 1] = kAdd; in CalculateOptimalEdits()
1062 costs[l_i + 1][r_i + 1] = remove + 1; in CalculateOptimalEdits()
1063 best_move[l_i + 1][r_i + 1] = kRemove; in CalculateOptimalEdits()
1067 costs[l_i + 1][r_i + 1] = replace + 1.00001; in CalculateOptimalEdits()
1068 best_move[l_i + 1][r_i + 1] = kReplace; in CalculateOptimalEdits()
1075 for (size_t l_i = left.size(), r_i = right.size(); l_i > 0 || r_i > 0;) { in CalculateOptimalEdits() local
1076 EditType move = best_move[l_i][r_i]; in CalculateOptimalEdits()
1079 r_i -= move != kRemove; in CalculateOptimalEdits()
1208 size_t l_i = 0, r_i = 0, edit_i = 0; in CreateUnifiedDiff() local
1214 ++r_i; in CreateUnifiedDiff()
1220 Hunk hunk(l_i - prefix_context + 1, r_i - prefix_context + 1); in CreateUnifiedDiff()
1247 hunk.PushLine('+', right[r_i].c_str()); in CreateUnifiedDiff()
1252 r_i += edit != kRemove; in CreateUnifiedDiff()