InfluenceDiagram.changeVariableName

InfluenceDiagram.changeVariableName(*args)
Parameters:
  • var (int | str) – a variable’s id (int) or name

  • new_name (str) – the name of the variable

Raises:
Return type:

None

Example

import pyagrum as gum

diag = gum.fastID("C->*D->$U<-C")
diag.changeVariableName("C", "Weather")
sorted(diag.names())
# ['D', 'U', 'Weather']
diag.idFromName("Weather")
# 0

Class

InfluenceDiagram