25 for (i=0; i<graph->
ncon; i++)
37 switch (ctrl->
RType) {
51 if (graph == orggraph)
77 graph->
rdata =
idxmalloc(5*nvtxs,
"Allocate2WayPartitionMemory: rdata");
79 graph->
id = graph->
rdata + nvtxs;
80 graph->
ed = graph->
rdata + 2*nvtxs;
93 int i, j, k, l, nvtxs, ncon, nbnd, mincut;
94 idxtype *xadj, *adjncy, *adjwgt;
95 float *nvwgt, *npwgts;
100 nvtxs = graph->
nvtxs;
103 nvwgt = graph->
nvwgt;
107 where = graph->
where;
119 for (i=0; i<nvtxs; i++) {
120 ASSERT(where[i] >= 0 && where[i] <= 1);
122 saxpy(ncon, 1.0, nvwgt+i*ncon, 1, npwgts+me*ncon, 1);
124 for (j=xadj[i]; j<xadj[i+1]; j++) {
125 if (me == where[adjncy[j]])
131 if (ed[i] > 0 || xadj[i] == xadj[i+1]) {
151 int i, j, k, nvtxs, nbnd, me;
152 idxtype *xadj, *adjncy, *adjwgt, *adjwgtsum;
153 idxtype *cmap, *where, *id, *ed, *bndptr, *bndind;
154 idxtype *cwhere, *cid, *ced, *cbndptr;
158 cwhere = cgraph->
where;
163 nvtxs = graph->
nvtxs;
172 where = graph->
where;
180 for (i=0; i<nvtxs; i++) {
182 where[i] = cwhere[k];
183 cmap[i] = cbndptr[k];
186 for (nbnd=0, i=0; i<nvtxs; i++) {
189 id[i] = adjwgtsum[i];
191 if (xadj[i] == xadj[i+1]) {
197 for (j=xadj[i]; j<xadj[i+1]; j++) {
198 if (me != where[adjncy[j]])
203 if (ed[i] > 0 || xadj[i] == xadj[i+1]) {
#define MocProject2WayPartition
struct graphdef * coarser
#define MocFM_2WayEdgeRefine2
#define IFSET(a, flag, cmd)
#define MocFM_2WayEdgeRefine
#define MocCompute2WayPartitionParams
#define MocAllocate2WayPartitionMemory