BayesNet.connectedComponentsCount
- BayesNet.connectedComponentsCount()
number of connected components
- Returns:
the number of connected components in the graph.
- Return type:
int
Example
import pyagrum as gum
bn = gum.fastBN("A->B;C->D;E")
bn.connectedComponentsCount()
# 3
Class