40 register sm_row *prow, *save_sec;
41 register sm_col *c1 = NULL, *c2 = NULL;
43 int c1_col_num, c2_col_num;
44 int primary_row_num = -1, secondary_row_num = -1;
48 for(prow = A->first_row; prow != 0; prow = prow->
next_row) {
54 }
else if (c2->length == 2) {
60 primary_row_num = prow->
row_num;
61 secondary_row_num = c1->
first_row->row_num;
62 if (secondary_row_num == primary_row_num) {
63 secondary_row_num = c1->
last_row->row_num;
72 c2_col_num = c2->col_num;
76 for(p = c2->first_row; p != 0; p = p->next_row) {
77 if (p->row_num != primary_row_num) {
79 for(p1 = save_sec->
first_col; p1 != 0; p1 = p1->next_col) {
80 (void)
sm_insert(A, p->row_num, p1->col_num);
90 stats->gimpel_count++;
92 *best =
sm_mincov(A, select, weight, lb-1, bound-1, depth, stats);
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)
sm_row * sm_row_dup(sm_row *prow)
void sm_delrow(sm_matrix *A, int i)
#define sm_get_row(A, rownum)
#define ABC_NAMESPACE_IMPL_END
#define sm_get_col(A, colnum)
sm_element * sm_insert(sm_matrix *A, int row, int col)
#define ABC_NAMESPACE_IMPL_START
solution_t * sm_mincov(sm_matrix *A, solution_t *select, int *weight, int lb, int bound, int depth, stats_t *stats)
typedefABC_NAMESPACE_HEADER_START struct sm_element_struct sm_element
void sm_row_free(sm_row *prow)
void sm_row_remove(sm_row *prow, int col)
void sm_delcol(sm_matrix *A, int i)
int sm_row_intersects(sm_row *p1, sm_row *p2)