EpiGrad
unread,Jul 30, 2011, 8:32:18 PM7/30/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to networkx-discuss
Hey all,
I'm working on a problem, and I've hit a spot where my relative
inexperience with Python, and programming in general, has hit a wall.
I have a directed graph G, with two parent nodes all the other nodes
are connected from. What I'm looking to do is produce a graph of this
network, with every node that came from one parent colored one way,
and all the others colored a second way. So essentially, I need a list
of nodes that's not only the successors to "Parent 1" but the
successors of those successors, the successors of the successors
successors, etc. Preferably for an arbitrary number of generations,
because while I could hard code it for each network, it would be nice
to be able to just throw a network at it and have it work.
Any idea how to approach this?
Thanks,
Eric