InfluenceDiagram.connectedComponentsList
- InfluenceDiagram.connectedComponentsList()
connected components as a dict of sets
- Returns:
dict of connected components (as sets of nodeIds) keyed by the index of the component.
- Return type:
dict(int,set[int])
Example
import pyagrum as gum
diag = gum.fastID("A->*D->$U;B->$V")
sorted(diag.connectedComponentsList().items())
# [(0, {0, 1, 2}), (1, {3, 4})]
Class