Commit 20f017b9 authored by Mathieu Giraud's avatar Mathieu Giraud

core/dynprog.cpp: breaking refactor, no back-and-forth i/j reverse conversions

We will handle later these conversions with AlignBox.reverse()
parent 81c8ea6e
......@@ -441,12 +441,6 @@ int DynProg::compute(bool onlyBottomTriangle, int onlyBottomTriangleShift)
best_score = B[m][n].score;
}
if (reverse_x)
best_i = m - best_i + 1 ;
if (reverse_y)
best_j = n - best_j + 1;
B[0][0].type = FIN;
// In the matrix positions start at 1, but start positions may start at 0
......@@ -491,13 +485,6 @@ void DynProg::backtrack()
int i=best_i+1;
int j=best_j+1;
// Retake good i/j when there were reversed strings
if (reverse_x)
i = m - i + 1 ;
if (reverse_y)
j = n - j + 1;
if ((i<0) || (i>m) || (j<0) || (j>n))
{
cout << "Invalid backtrack starting point: " << i << "," << j << endl ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment