Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[joss] How to find connected components in undirected graphs? #514

Closed
szhorvat opened this issue Dec 4, 2021 · 1 comment · Fixed by #528
Closed

[joss] How to find connected components in undirected graphs? #514

szhorvat opened this issue Dec 4, 2021 · 1 comment · Fixed by #528

Comments

@szhorvat
Copy link

szhorvat commented Dec 4, 2021

How can I find the connected components in an undirected graph?

For directed graphs, there are retworkx.strongly_connected_components and retworkx.weakly_connected_components, but these throw an error on undirected graphs.

This is one of the most fundamental operations so I expect there must be a function that I'm just missing?

@georgios-ts
Copy link
Collaborator

No, currently such function is missing for undirected graphs but it should be a simple addition.
In general, PyDiGraph has received more attention due to its extensive use in qiskit-terra, so there might be some functionality gaps between undirected/directed graphs that we should definitely start closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants