HP MLIB User's Guide Vol. 2 7th Ed.
980 HP MLIB User’s Guide
mlib_METIS_WPartGraphRecursive 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—Region growing (Default)
options[3] Determines the algorithm used for
refinement. Possible values are:
1—Early-Exit Boundary FM Refinement (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.
Notes This function should be used to partition a graph into a small number of
partitions (less than 8). If a large number of partitions is desired, the
mlib_METIS_WPartGraphKWay routine should be used instead, as it is
significantly faster.