From bc4366dabbdaa036b3fe401a59fafab6c39738c1 Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Sat, 12 Nov 2011 07:03:30 +0000 Subject: [PATCH] Doc edition --- src/obitools/graph/algorithms/component.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/obitools/graph/algorithms/component.py b/src/obitools/graph/algorithms/component.py index 11fff11..a17c8dd 100644 --- a/src/obitools/graph/algorithms/component.py +++ b/src/obitools/graph/algorithms/component.py @@ -12,6 +12,8 @@ So a node cannot belongs to two distinct connected component. Two nodes are in the same connected component if it exits a path through the graph edges linking them. +TODO: THere is certainly a bug with DirectedGraph + """ def componentIterator(graph,nodePredicat=None,edgePredicat=None): @@ -41,7 +43,7 @@ def componentIterator(graph,nodePredicat=None,edgePredicat=None): on which is based this function. ''' seen = set() - for n in graph: + for n in graph.nodeIterator(nodePredicat): if n.index not in seen: cc=n.componentIndexSet(nodePredicat, edgePredicat) yield cc