Lines Matching refs:r_i

2489   for (size_t r_i = 1; r_i < costs[0].size(); ++r_i) {  in CalculateOptimalEdits()  local
2490 costs[0][r_i] = static_cast<double>(r_i); in CalculateOptimalEdits()
2491 best_move[0][r_i] = kAdd; in CalculateOptimalEdits()
2495 for (size_t r_i = 0; r_i < right.size(); ++r_i) { in CalculateOptimalEdits() local
2496 if (left[l_i] == right[r_i]) { in CalculateOptimalEdits()
2498 costs[l_i + 1][r_i + 1] = costs[l_i][r_i]; in CalculateOptimalEdits()
2499 best_move[l_i + 1][r_i + 1] = kMatch; in CalculateOptimalEdits()
2503 const double add = costs[l_i + 1][r_i]; in CalculateOptimalEdits()
2504 const double remove = costs[l_i][r_i + 1]; in CalculateOptimalEdits()
2505 const double replace = costs[l_i][r_i]; in CalculateOptimalEdits()
2507 costs[l_i + 1][r_i + 1] = add + 1; in CalculateOptimalEdits()
2508 best_move[l_i + 1][r_i + 1] = kAdd; in CalculateOptimalEdits()
2510 costs[l_i + 1][r_i + 1] = remove + 1; in CalculateOptimalEdits()
2511 best_move[l_i + 1][r_i + 1] = kRemove; in CalculateOptimalEdits()
2515 costs[l_i + 1][r_i + 1] = replace + 1.00001; in CalculateOptimalEdits()
2516 best_move[l_i + 1][r_i + 1] = kReplace; in CalculateOptimalEdits()
2523 for (size_t l_i = left.size(), r_i = right.size(); l_i > 0 || r_i > 0;) { in CalculateOptimalEdits() local
2524 EditType move = best_move[l_i][r_i]; in CalculateOptimalEdits()
2527 r_i -= move != kRemove; in CalculateOptimalEdits()
2656 size_t l_i = 0, r_i = 0, edit_i = 0; in CreateUnifiedDiff() local
2662 ++r_i; in CreateUnifiedDiff()
2668 Hunk hunk(l_i - prefix_context + 1, r_i - prefix_context + 1); in CreateUnifiedDiff()
2695 hunk.PushLine('+', right[r_i].c_str()); in CreateUnifiedDiff()
2700 r_i += edit != kRemove; in CreateUnifiedDiff()