Skip to content

Commit

Permalink
r639: changed -O/-E validation
Browse files Browse the repository at this point in the history
  • Loading branch information
lh3 committed Dec 31, 2017
1 parent cc75c12 commit dc9e3dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "mmpriv.h"
#include "getopt.h"

#define MM_VERSION "2.6-r638-dirty"
#define MM_VERSION "2.6-r639-dirty"

#ifdef __linux__
#include <sys/resource.h>
Expand Down
12 changes: 5 additions & 7 deletions map.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,18 +117,16 @@ int mm_set_opt(const char *preset, mm_idxopt_t *io, mm_mapopt_t *mo)

int mm_check_opt(const mm_idxopt_t *io, const mm_mapopt_t *mo)
{
/*
if (mo->a + 2 * (mo->q + mo->e) > 127 || mo->a + 2 * (mo->q2 + mo->e2) > 127) {
if (mm_verbose >= 1)
fprintf(stderr, "[ERROR]\033[1;31m scoring system violating {-A}+2*({-O}+{-E}) <= 127\033[0m\n");
return -1;
}
if ((mo->q != mo->q2 || mo->e != mo->e2) && !(mo->e > mo->e2 && mo->q + mo->e < mo->q2 + mo->e2)) {
if (mm_verbose >= 1)
fprintf(stderr, "[ERROR]\033[1;31m dual gap penalties violating E1>E2 and O1+E1<O2+E2\033[0m\n");
return -2;
}
*/
if ((mo->q + mo->e) + (mo->q2 + mo->e2) > 127) {
if (mm_verbose >= 1)
fprintf(stderr, "[ERROR]\033[1;31m scoring system violating ({-O}+{-E})+({-O2}+{-E2}) <= 127\033[0m\n");
return -1;
}
return 0;
}

Expand Down

0 comments on commit dc9e3dc

Please sign in to comment.