connected_component_indicators#

tangles.util.graph.connected_component_indicators(A: spmatrix | ndarray) ndarray#

Compute a matrix containing indicator vectors of the connected components of a graph as columns.

Parameters#

Asparse.spmatrix or np.ndarray

Adjacency matrix of a graph.

Returns#

np.array

Resulting component indicators (bool-matrix containing the indicator vectors as columns).