networkx/networkx — pull request #791 by jni (2012-11-13 06:46:12+00:00)
Title: Finding ancestors and descendants in DAGs

Hi Aric,

I've added two functions in algorithms for directed acyclic graphs, `ancestors` and `descendants`. They find all nodes from which you can reach `source`, and all nodes reachable from `source`, respectively.

In addition, I did a bit of renaming in BFS, since you are actually using a queue, not a stack. (I'm guessing the "stack" name carried over from DFS.)

Juan.