static glp_prob *best_prob;
static AdjWord *best_adjmatrix;
-static int n_over_best, m_over_best;
+static int n_max_frags, m_max_frags;
static int *weight;
static unsigned printcounter;
static void set_best(double new_best) {
best = new_best;
- n_over_best = floor(n / best);
- m_over_best = floor(m / best);
+ n_max_frags = floor(n / best);
+ m_max_frags = floor(m / best);
}
/*----- multicore support -----*/
glp_term_out(GLP_OFF);
setlinebuf(stderr);
weight = calloc(sizeof(*weight), m); assert(weight);
- n_over_best = INT_MAX;
- m_over_best = INT_MAX;
+ n_max_frags = INT_MAX;
+ m_max_frags = INT_MAX;
}
#if 0
static int totalfrags;
static bool maxhamweight_ok(void) {
- return maxhamweight <= m_over_best;
+ return maxhamweight <= m_max_frags;
}
static bool preconsider_ok(int nwords, bool doprint) {
for (i=0, totalfrags=0; i<nwords; i++) {
int frags = count_set_adj_bits(adjmatrix[i]);
PRINTF("%"PRADJ" ", adjmatrix[i]);
- if (frags > m_over_best) {
+ if (frags > m_max_frags) {
PRINTF(" too fine");
goto out;
}
if (adjmatrix[i] & jbit)
weight[j]++;
for (int j = 0; j < m; j++)
- if (weight[j] >= n_over_best)
+ if (weight[j] >= n_max_frags)
goto takeout;
iterate_recurse(i+1, adjmatrix[i]);