MAG.adjacents
- MAG.adjacents(node)
- Parameters:
node (
int) – the id of a node- Returns:
the nodes linked to node by an edge, whatever its marks
- Return type:
set[int]
Example
import pyagrum as gum
dag = gum.fastDAG("A->X;Y<-B;X<-T->Y")
mag = gum.MAG.fromDAG(dag, {4}) # T latent: A->X<->Y<-B
mag.adjacents(1) # whatever the marks
# {0, 2}
Class