Block decompositions from the graph of a matrix
Source:R/matgeo-matrices.R
connected_components_decomposition.Rdconnected_components_decomposition(M) returns list(P, B) with a
PermutationMatrix P and a BlockDiagMatrix B such that
M = P^T B P; strongly_connected_components_decomposition(M, lower)
does the same with a block triangular BlockMatrix, as SymPy.