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

Chapter 14 METIS Routines 981
Partitions a graph mlib_METIS_WPartGraphKway
Name mlib_METIS_WPartGraphKway
Partitions a graph
Purpose This function is used to partition a graph into k parts using multilevel recursive
bisection. The underlying algorithm is similar to the one used by
mlib_METIS_PartGraphKway, but it can be used to compute a partitioning
with prescribed partition weights. For example, it can be used to compute a
3-way partition such that partition 1 has 50% of the weight, partition 2 has 20%
of the weight, and partition 3 has 30% of the weight. The objective of the
partitioning is to minimize the edgecut.
Usage VECLIB:
void mlib_METIS_WPartGraphKway (int *n, int *xadj, int *adjncy, int
*vwgt, int *adjwgt, int *wgtflag, int *numflag, int *nparts, int *tpwgts,
int *options, int *edgecut, int *part)
VECLIB8:
void mlib_METIS_WPartGraphKway (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 *tpwgts, 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 the 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.