Say I have two networkx graphs, G and H: What is the best way to join the two networkx graphs? I’d like to preserve the node names (note the common nodes, 2 to 7). When I used nx.disjoint_union(G,H), this did not happen: The H node labels were changed (not what I want). I want to join the graphs at the
Tag: graph-theory
I’m trying to perform the transitive reduction of directed graph in Python
As a warning, I’m still a bit inexperienced in python I’m trying to perform the transitive reduction of directed graph using the networkx library. I’ve figured out an algorithm but I’m having trouble implementing it. After a quick search, I found algorithms similar to mine in other stack exchange questions but no demonstrations of how to actually code the algorithm.