32 switch (ctrl->
RType) {
42 if (graph == orggraph)
64 graph->
rdata =
idxmalloc(5*nvtxs+2,
"Allocate2WayPartitionMemory: rdata");
67 graph->
id = graph->
rdata + nvtxs + 2;
68 graph->
ed = graph->
rdata + 2*nvtxs + 2;
79 int i, j, k, l, nvtxs, nbnd, mincut;
80 idxtype *xadj, *vwgt, *adjncy, *adjwgt, *pwgts;
103 for (i=0; i<nvtxs; i++) {
104 ASSERT(where[i] >= 0 && where[i] <= 1);
106 pwgts[me] += vwgt[i];
108 for (j=xadj[i]; j<xadj[i+1]; j++) {
109 if (me == where[adjncy[j]])
115 if (ed[i] > 0 || xadj[i] == xadj[i+1]) {
136 int i, j, k, nvtxs, nbnd, me;
137 idxtype *xadj, *adjncy, *adjwgt, *adjwgtsum;
138 idxtype *cmap, *where, *id, *ed, *bndptr, *bndind;
139 idxtype *cwhere, *cid, *ced, *cbndptr;
143 cwhere = cgraph->
where;
148 nvtxs = graph->
nvtxs;
157 where = graph->
where;
165 for (i=0; i<nvtxs; i++) {
167 where[i] = cwhere[k];
168 cmap[i] = cbndptr[k];
171 for (nbnd=0, i=0; i<nvtxs; i++) {
174 id[i] = adjwgtsum[i];
176 if (xadj[i] == xadj[i+1]) {
182 for (j=xadj[i]; j<xadj[i+1]; j++) {
183 if (me != where[adjncy[j]])
188 if (ed[i] > 0 || xadj[i] == xadj[i+1]) {
#define Project2WayPartition
#define Compute2WayPartitionParams
struct graphdef * coarser
#define IFSET(a, flag, cmd)
#define FM_2WayEdgeRefine
#define Allocate2WayPartitionMemory