Open rkern opened 10 years ago
Does the "number of generations" here refer to depth in the original graph or depth in the graph of strongly connected components? That is, with generations=1
, would you want to get all the complete components reachable from the source component, or just the nodes of the original graph reachable from the source component in a single step?
in red, of course
Of course!
Generations of nodes. I imagine subgraph_descendants()
as agnostic to the nature of the subgraph it is looking at. For that matter, a more general method would just take an iterable of nodes, but all of my actual use cases involve subgraphs.
If you want to highlight all of the non-source SCCs in blue, that would be cool, too. ;-)
I'd love to be able to export a
.dot
file from anObjectGraph
that contains a subgraph of a garbage snapshot that contains just a specified source component and its descendants (to a configurable number of generations). With the source component subgraph highlighted in red, of course.