131 int pick, lb_new,
debug;
135 if (depth > stats->max_depth) stats->max_depth = depth;
136 debug = stats->debug && (depth <= stats->max_print_depth);
140 if (select->
cost >= bound) {
146 if ( weight ==
NIL(
int)) {
147 if (
gimpel_reduce(A, select, weight, lb, bound, depth, stats, &best)) {
167 stats->lower_bound = lb_new + stats->gimpel;
171 (void) printf(
"ABSMIN[%2d]%s", depth, stats->component ?
"*" :
" ");
172 (void) printf(
" %3dx%3d sel=%3d bnd=%3d lb=%3d %12s ",
174 bound + stats->gimpel, lb_new + stats->gimpel,
179 if (lb_new >= bound) {
180 if (debug) (void) printf(
"bounded\n");
185 }
else if (A->
nrows == 0) {
187 if (debug) (void) printf(
"BEST\n");
188 if (stats->debug && stats->component == 0) {
189 (void) printf(
"new 'best' solution %d at level %d (time is %s)\n",
190 best->
cost + stats->gimpel, depth,
203 if (debug) (void) printf(
"comp %d %d\n", L->
nrows, R->
nrows);
210 bound-select->
cost, depth+1, stats);
219 for(p = best1->
row->
first_col; p != 0; p = p->next_col) {
225 best =
sm_mincov(R, select, weight, lb_new, bound, depth+1, stats);
231 if (debug) (void) printf(
"pick=%d\n", pick);
237 best1 =
sm_mincov(A1, select1, weight, lb_new, bound, depth+1, stats);
247 if (stats->no_branching) {
260 best2 =
sm_mincov(A2, select2, weight, lb_new, bound, depth+1, stats);
int sm_block_partition(sm_matrix *A, sm_matrix **L, sm_matrix **R)
static void select_essential()
ABC_NAMESPACE_IMPL_START int gimpel_reduce(sm_matrix *A, solution_t *select, int *weight, int lb, int bound, int depth, stats_t *stats, solution_t **best)
solution_t * solution_dup()
solution_t * sm_maximal_independent_set(sm_matrix *A, int *weight)
sm_matrix * sm_dup(sm_matrix *A)
solution_t * solution_alloc()
void sm_free(sm_matrix *A)
solution_t * sm_mincov(sm_matrix *A, solution_t *select, int *weight, int lb, int bound, int depth, stats_t *stats)
static int select_column()
solution_t * solution_choose_best()
typedefABC_NAMESPACE_HEADER_START struct sm_element_struct sm_element