Commit e7573a2d authored by Mathieu Giraud's avatar Mathieu Giraud

core/dynprog.{cpp,h}: refactoring the score computation and backtrack loops

Edit operations, with their score computation and their backtracking information,
are now defined in a unique location.
The code should thus be more flexible and easier to read and maintain.
parent 6f50dfe8
This diff is collapsed.
......@@ -16,10 +16,12 @@ using namespace std;
float identity_percent(int score);
typedef struct {
char type;
int i;
int j;
int type;
} backtrack_info;
int score;
} operation;
class Cost
......@@ -108,8 +110,8 @@ class DynProg
friend ostream& operator<<(ostream& out, const DynProg& dp);
int **S;
backtrack_info **B;
int **S; // Score matrix
operation **B; // Backtrack matrix
int *gap1 ;
int *linkgap ;
int *gap2 ;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment