Doc edition

This commit is contained in:
2011-11-12 07:03:30 +00:00
parent ff3420b5a1
commit bc4366dabb

View File

@ -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 Two nodes are in the same connected component if it exits a path through
the graph edges linking them. the graph edges linking them.
TODO: THere is certainly a bug with DirectedGraph
""" """
def componentIterator(graph,nodePredicat=None,edgePredicat=None): def componentIterator(graph,nodePredicat=None,edgePredicat=None):
@ -41,7 +43,7 @@ def componentIterator(graph,nodePredicat=None,edgePredicat=None):
on which is based this function. on which is based this function.
''' '''
seen = set() seen = set()
for n in graph: for n in graph.nodeIterator(nodePredicat):
if n.index not in seen: if n.index not in seen:
cc=n.componentIndexSet(nodePredicat, edgePredicat) cc=n.componentIndexSet(nodePredicat, edgePredicat)
yield cc yield cc