Weakly Connected Components

pyomo.contrib.incidence_analysis.connected.get_independent_submatrices(matrix)[source]

Partition a matrix into irreducible block diagonal form

This is equivalent to identifying the connected components of the bipartite incidence graph of rows and columns.

Parameters:

matrix (scipy.sparse.coo_matrix) – Matrix to partition into block diagonal form

Returns:

  • row_blocks (list of lists) – Partition of row coordinates into diagonal blocks

  • col_blocks (list of lists) – Partition of column coordinates into diagonal blocks