metis_rs

class metis_rs.Graph(n, xadj, adjncy, adjwgt=None, vwgt=None)

Bases: object

A graph in Compressed Sparse Row (CSR) format, ready for partitioning.

edge_cut(part)

Total weight of edges crossing the given partition assignment.

n
metis_rs.partition(graph, nparts)

Partitions graph into nparts parts. part[u] is the 0-based part ID assigned to vertex u.