You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
How to split graph into disconnected subgraphs #163
Is there a way to split graph into subgraphs which are not connected with each other?
For example, the graph with vertices A,B,C,D,E and edges A-B ,C-D, D-E(please note lack of B-C edge) could be divided into two "isolated" graphs:
(A-B)
(C-D-E)
@AkashKumar7902 I used github.com/yourbasic/graph package(function graph.Components()) to complete my task. But i still hope this functionality will be added to this package.
Activity
[-]How to split graph into isolated subgraphs[/-][+]How to split graph into disconnected subgraphs[/+]AkashKumar7902 commentedon Feb 9, 2024
@orzel7 did you found a solution for it ?
orzel7 commentedon Feb 9, 2024
@AkashKumar7902 I used github.com/yourbasic/graph package(function graph.Components()) to complete my task. But i still hope this functionality will be added to this package.
dominikbraun commentedon Mar 6, 2024
Hi, I'm going to open a feature request for this function.
orzel7 commentedon Apr 7, 2024
@dominikbraun, please take a look on my change: #171 If is conceptually ok for you, I'll add some tests.
@AkashKumar7902, this PR works for me.