contract_graph#
- tangles.util.graph.minor.contract_graph(A: ndarray, bag_indicator: csc_matrix) ndarray #
Calculate the minor of a graph given a matrix of bag indicators.
Parameters#
- Anp.ndarray
The adjacency matrix to find the minor of.
- bag_indicatorsparse.csc_matrix
A (number of vertices in the graph, number of bags) sparse.csc_matrix indicating what vertices are contained in which bag.
Returns#
- np.ndarray
The minor.