graphdot.graph.reorder.rcm module

graphdot.graph.reorder.rcm.rcm(g)[source]

Compute the reverse Cuthill-Mckee permutation of a graph. Note that the method does NOT modify the graph, but rather just returns a permutation vector that can be used by Graph.permute to achieve the actual reordering.

Parameters:g (Graph) – The graph to be reordered.
Returns:perm – Array of permuted node indices.
Return type:numpy.ndarray