'How to connect all components of a DiGraph in NetworkX
I have a directed graph (G), which is made of 65 strongly connected components and 8 weakly connected components. I am aware I can add non-existent edges to connect the entire graph using k-edge-augmentation, but this is only possible with an undirected graph.
Is there any way, within NetworkX, or otherwise to connect the DiGraph to produce one strongly connected component?
Solution 1:[1]
For anyone else coming here in future, one idea I had which I'm probably going to go with is to create both a directed and undirected graph from your data, perform k-edge-augmentation on the undirected graph, and using the edges this returns, add a biconnected component between them in the directed graph.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Luca Passariello |
