changeset 4335 | 1314772c1183 |
parent 4252 | 6c4f109c2b03 |
parent 4317 | b2093f8f0493 |
child 4466 | 8b0ca7904820 |
--- a/utils.py Fri Jan 22 14:40:29 2010 +0100 +++ b/utils.py Fri Jan 22 14:41:08 2010 +0100 @@ -152,6 +152,9 @@ # use networkX instead ? # http://networkx.lanl.gov/reference/algorithms.traversal.html#module-networkx.algorithms.traversal.astar def transitive_closure_of(entity, relname, _seen=None): + """return transitive closure *for the subgraph starting from the given + entity* (eg 'parent' entities are not included in the results) + """ if _seen is None: _seen = set() _seen.add(entity.eid)