networkx-metis
networkx-metis copied to clipboard
How to add constraints when graphs partition?
Hi, I want use nxmetis.partition(G, nparts, node_weight='weight', node_size='size', edge_weight='weight', tpwgts=None, ubvec=None, options=None, recursive=False)
to do graph patition, but I don't know how to add constraints, the constrains are like '1. the number of persons in every partition must smaller than B2, and bigger than B1', '2. the diameter of every partition must smaller than D2, and bigger than D1', can I set tpwgts to fulfill my needs?