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

982 HP MLIB User’s Guide
mlib_METIS_WPartGraphKway Partitions a graph
tpwgts This is an array containing nparts floating point
numbers. For partition i, tpwgts[i] stores the fraction of
the total weight that should be assigned to it. For
example, for a 4-way partition the vector tpwgts[]=[0.2
0.2 0.4 0.2]
will result in partitions 0, 1, and 3 having
20% of the weight and partition 2 having 40% of the
weight. Note that the numbers in tpwgts should add up
to 1.0.
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
options[0]=1 then the remaining 4 elements of options
are interpreted as follows:
options[1] Determines matching type. Possible values
are:
1—Random Matching (RM)
2—Heavy-Edge Matching (HEM)
3—Sorted Heavy-Edge Matching (SHEM)(Default)
Experiments have shown that both HEM and SHEM
perform quite well.
options[2] Determines the algorithm used during
initial partioning. Possible values are:
1—Multilevel recursive bisection (Default)
options[3] Determines the algorithm used for
refinement. Possible values are:
1—Random Boundary Refinement
2—Greedy Boundary Refinement
3—Random Boundary Refinement that also minimizes
teh connectivity among the subdomains (Default)
options[4] Used for debugging purposes. Always set it
to 0 (Default)
edgecut Upon successful completion, this variable stores the
number of edges that are cut by the partition.
part This is a vector of size n that upon successful
completion stores the partition vector of the graph. The
numbering of this vector starts from either 0 or 1,
depending on the value of numflag.