SciPy

scipy.sparse.csgraph.structural_rank

scipy.sparse.csgraph.structural_rank(graph)

Compute the structural rank of a graph (matrix) with a given sparsity pattern.

The structural rank of a matrix is the number of entries in the maximum transversal of the corresponding bipartite graph, and is an upper bound on the numerical rank of the matrix. A graph has full structural rank if it is possible to permute the elements to make the diagonal zero-free.

Parameters:

graph : sparse matrix

Input sparse matrix.

Returns:

rank : int

The structural rank of the sparse graph.

New in version 0.19.0.

References

[R279]I. S. Duff, “Computing the Structural Index”, SIAM J. Alg. Disc. Meth., Vol. 7, 594 (1986).
[R280]http://www.cise.ufl.edu/research/sparse/matrices/legend.html