Doc edition
This commit is contained in:
@ -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
|
||||||
|
Reference in New Issue
Block a user