24 idxtype *adjwgt,
int *wgtflag,
int *numflag,
int *nparts,
int *chainlength,
25 int *options,
int *edgecut,
idxtype *part,
int levels)
30 tpwgts =
fmalloc(*nparts,
"MLKKM: tpwgts");
31 for (i=0; i<*nparts; i++)
32 tpwgts[i] = 1.0/(1.0*(*nparts));
35 tpwgts, options, edgecut, part, levels);
45 idxtype *adjwgt,
int *wgtflag,
int *numflag,
int *nparts,
int *chainlength,
46 float *tpwgts,
int *options,
int *edgecut,
idxtype *part,
int levels)
57 if (options[0] == 0) {
85 *edgecut =
MLKKMPartitioning(&ctrl, &graph, *nparts, *chainlength, part, tpwgts, 1.03);
181 int i, j, nvtxs, tvwgt, tpwgts2[2];
183 int wgtflag=3, numflag=0, options[10], edgecut;
187 char *mlwkkm_fname =
"coarse.graph";
210 cgraph->
adjwgt, &wgtflag, &numflag, &nparts, tpwgts, options,
211 &edgecut, cgraph->
where);
217 IFSET(ctrl->
dbglvl,
DBG_IPART, printf(
"Initial %d-way partitioning cut: %d\n", nparts, edgecut));
251 MLKKMRefine(ctrl, graph, cgraph, nparts, chain_length, tpwgts, ubfactor);
#define IFSET(a, flag, cmd)
void MLKKM_PartGraphKway(int *nvtxs, idxtype *xadj, idxtype *adjncy, idxtype *vwgt, idxtype *adjwgt, int *wgtflag, int *numflag, int *nparts, int *chainlength, int *options, int *edgecut, idxtype *part, int levels)
void MLKKM_WPartGraphKway(int *nvtxs, idxtype *xadj, idxtype *adjncy, idxtype *vwgt, idxtype *adjwgt, int *wgtflag, int *numflag, int *nparts, int *chainlength, float *tpwgts, int *options, int *edgecut, idxtype *part, int levels)
int spectral_initialization
int MLKKMPartitioning(CtrlType *ctrl, GraphType *graph, int nparts, int chain_length, idxtype *part, float *tpwgts, float ubfactor)
MiniVec< float, N > floor(const MiniVec< float, N > &a)
void METIS_WPartGraphRecursive(int *nvtxs, idxtype *xadj, idxtype *adjncy, idxtype *vwgt, idxtype *adjwgt, int *wgtflag, int *numflag, int *nparts, float *tpwgts, int *options, int *edgecut, idxtype *part)
void MLKKMRefine(CtrlType *, GraphType *, GraphType *, int, int, float *, float)
#define Change2CNumbering
#define Change2FNumbering
#define AllocateKWayPartitionMemory
#define ComputePartitionInfo
#define AllocateWorkSpace