CredalNet.addVariable
- CredalNet.addVariable(name, card)
- Parameters:
name (
str) – the name of the new variablecard (
int) – the domainSize of the new variable
- Returns:
the id of the new node
- Return type:
int
Example
import pyagrum as gum
cn = gum.CredalNet()
cn.addVariable("A", 3)
# 0
cn.domainSize(0)
# 3
Class