31 bndind =
graph->bndind;
36 for (
i=0;
i<nbnd;
i++) {
71 idx_t i, ii,
j, jj, k,
l, nvtxs, nbnd, bnvtxs[3], bnedges[2], csize;
73 idx_t *
where, *bndind, *bndptr, *vmap, *ivmap, *cover;
82 bndind =
graph->bndind;
83 bndptr =
graph->bndptr;
92 bnvtxs[0] = bnvtxs[1] = bnedges[0] = bnedges[1] = 0;
93 for (
i=0;
i<nbnd;
i++) {
102 bnvtxs[2] = bnvtxs[0]+bnvtxs[1];
103 bnvtxs[1] = bnvtxs[0];
111 for (
i=0;
i<nbnd;
i++) {
116 ivmap[bnvtxs[k]++] =
j;
121 bnvtxs[1] = bnvtxs[0];
124 for (k=0; k<2; k++) {
125 for (ii=0; ii<nbnd; ii++) {
130 if (
where[jj] != k) {
133 badjncy[
l++] = vmap[jj];
136 bxadj[++bnvtxs[k]] =
l;
141 ASSERT(
l <= bnedges[0]+bnedges[1]);
143 MinCover(bxadj, badjncy, bnvtxs[0], bnvtxs[1], cover, &csize);
146 printf(
"Nvtxs: %6"PRIDX", [%5"PRIDX" %5"PRIDX"], Cut: %6"PRIDX", SS: [%6"PRIDX" %6"PRIDX"], Cover: %6"PRIDX"\n", nvtxs,
graph->pwgts[0],
graph->pwgts[1],
graph->mincut, bnvtxs[0], bnvtxs[1]-bnvtxs[0], csize));
148 for (
i=0;
i<csize;
i++) {
155 printf(
"Nvtxs: %6"PRIDX", [%5"PRIDX" %5"PRIDX"], Cut: %6"PRIDX", SS: [%6"PRIDX" %6"PRIDX"], Cover: %6"PRIDX"\n", nvtxs,
graph->pwgts[0],
graph->pwgts[1],
graph->mincut, (
idx_t)0, (
idx_t)0, (
idx_t)0));