InfluenceDiagram.variable
- InfluenceDiagram.variable(*args)
- Parameters:
id (
int) – the node id- Returns:
a constant reference over a variabe given it’s node id
- Return type:
- Raises:
pyagrum.NotFound – If no variable’s id matches the parameter
Example
import pyagrum as gum
diag = gum.fastID("C->*D->$U<-C")
print(diag.variable("D"))
# D:Range([0,1])
diag.variable(0).name()
# 'C'
Class