static void refine(void) { /* Add target to beta */ beta[nbeta++] = target; abmark[target] = 1; /* Keep going until refinement stops */ while (1) { /* If discrete, clear alpha and bail */ if (cells == n) { while (nalpha) { abmark[alpha[--nalpha]] = 0; } while (nbeta) { abmark[beta[--nbeta]] = 0; } break; } /* Look for something else to refine on */ if (nbeta) { front = beta[--nbeta]; } else if (nalpha) { front = alpha[--nalpha]; } else break; abmark[front] = 0; /* Perform the appropriate refinement operation */ if (ptn[front] <= lev) { ref_singleton(lab[front]); } else { ref_nonsingle(front, front + clen[front]); } } }
static int ref_nonsingle_undirected(struct saucy *s, struct coloring *c, int cf) { return ref_nonsingle(s, c, s->adj, s->edg, cf); }