HP MLIB User's Guide Vol. 2 7th Ed.

Chapter 14 METIS Routines 969
Partitions a graph mlib_METIS_PartGraphKway
Name mlib_METIS_PartGraphKway
Partitions a graph
Purpose This function is used to partition a graph into k equal-size parts using
multilevel k-way partitioning algorithm. It provides the functionality of the
kmetis program. The objective of the partitioning is to minimize the edgecut.
Usage VECLIB:
void mlib_METIS_PartGraphKway (int *n, int *xadj, int *adjncy, int
*vwgt, int *adjwgt, int *wgtflag, int *numflag, int *nparts, int *options,
int *edgecut, int *part)
VECLIB8:
void mlib_METIS_PartGraphKway (long long *n, long long *xadj, long
long *adjncy, long long *vwgt, long long *adjwgt, long long *wgtflag, long
long *numflag, long long *nparts, long long *options, long long *edgecut,
long long *part)
Arguments n The number of vertices in the graph.
xadj,
adjncy
The adjacency structure of the graph.
vwgt,
adjwgt
Information about the weights of the vertices and
edges.
wgtflag Used to indicate if the graph is weighted. wgtflag can
take the following values:
0—No weights (vwgt and adjwgt are NULL)
1—Weights on the edges only (vwgt=NULL)
2—Weights on the vertices only (adjwgt=NULL)
3—Weights both on vertices and edges
numflag Used to indicate which numbering scheme is used for
the adjacency structure of the graph. numflag can take
the following two values:
0—C-Style numbering is assumed that starts from 0
1—Fortran-style numbering is assumed that starts
from 1
nparts The number of parts to partition the graph.
options This is an array of 5 integers that is used to pass
parameters for the various phases of the algorithm. If
options[0]=0 then default values are used. If