CPDAG.idFromName
- CPDAG.idFromName(name)
Return the id of the node with the given name, or None if no such name exists.
- Parameters:
name (
str) – the name to look up- Returns:
the node id, or None if the name is not found
- Return type:
intorNone
Example
import pyagrum as gum
cpdag = gum.CPDAG.fromDAG(gum.fastDAG("A->B->C;D->C"))
cpdag.idFromName("D")
# 3
cpdag.idFromName("Z") is None
# True
Used by
