53{
54 int *vwgt = nullptr;
55 int *vsize = nullptr;
56 int *adjwgt = nullptr;
57 if (vertWgt.size() > 0)
58 {
59 vwgt = &vertWgt[0];
60 }
61 if (vertSize.size() > 0)
62 {
63 vsize = &vertSize[0];
64 }
65 if (edgeWgt.size() > 0)
66 {
67 adjwgt = &edgeWgt[0];
68 }
69
70 int ncon = nVertConds;
71 int options[METIS_NOPTIONS];
72 METIS_SetDefaultOptions(options);
73 METIS_PartGraphKway(&nVerts, &ncon, &xadj[0], &adjcy[0], vwgt, vsize,
74 adjwgt, &nparts, nullptr, nullptr, options, &volume,
75 &part[0]);
76}