spectral_features_splitted#
- tangles.separations.finding.spectral_features_splitted(laplacian: spmatrix | ndarray, k: int, check_connected: bool = True, min_component_size_fraction: float = 0.01, ignore_small_components: bool = True) ndarray #
Compute spectral bipartitions of a graph after splitting into connected components.
Usually this is faster than the direct method
spectral_bipartitions()
.Parameters#
- laplaciansparse.spmatrix or np.ndarray
Laplacian matrix of a graph.
- kint
Number of spectral bipartitions to compute.
- check_connectedbool
Check if the graph is connected. If it is not connected, create bipartitions separating out the connected components first. If k is bigger than the number of connected components, the remaining bipartitions will split the components.
- min_component_size_fractionfloat
Components of G smaller than min_component_size_fraction times the number of vertices are not analysed further.
- ignore_small_componentsbool
If True, the small components are on the small side of all bipartitions. Otherwise there is a bipartition for every connected component.
Returns#
- np.array
-1/1-matrix containing the k spectral bipartitions of the graph as columns. The array might contain more than k separations, if the graph has more than k (big) connected components. The first few columns contain bipartitions separating out the connected components. If the graph is connected, the first column is constant 1.