BayesNet.existsArc
- BayesNet.existsArc(*args)
Check if an arc exists
- Parameters:
tail (
int | str) – the name or id of the tail of the archead (
int | str) – the name or the id of the head of the arc
- Returns:
True if
tail->headis an arc.- Return type:
bool
Example
import pyagrum as gum
bn = gum.fastBN("A->B")
bn.existsArc("A", "B")
# True
bn.existsArc("B", "A")
# False
Class