* The arguments must be ordered so that n > m:
* n is the number of (more, shorter) input matches of length m
* m is the number of (fewer, longer) output matches of length n
+ *
+ * Options:
+ * -j<jobs> run in parallel on <jobs> cores
+ * -b<best> search only for better than <best>
*/
/*
* <=> frags < | n / best |
* _ _
* <=> frags <= | n / best | - 1
+ *
+ * But best values from glpk are slightly approximate, so we
+ * subtract a fudge factor from our target.
*/
- n_max_frags = ceil(n / best) - 1;
- m_max_frags = ceil(m / best) - 1;
+ double near_best = best * 0.98 - 0.02;
+ n_max_frags = ceil(n / near_best) - 1;
+ m_max_frags = ceil(m / near_best) - 1;
}
/*----- multicore support -----*/
while ((opt = getopt(argc,argv,"j:")) >= 0) {
switch (opt) {
case 'j': ncpus = atoi(optarg); break;
+ case 'b': set_best(atof(optarg)); break;
case '+': assert(!"bad option");
default: abort();
}