pywhy_graphs.algorithms.label_edges#
- pywhy_graphs.algorithms.label_edges(G: DiGraph)[source]#
Label compelled and reversible edges of a DAG G.
Label the edges of a DAG G as either compelled or reversible. Compelled edges are edges that are compelled to be directed in a consistent extension of G. Reversible edges are edges that are not required to be directed in a consistent extension of G. For full details, see Algorithm 5 in [1].
- Parameters:
- GDAG
The directed acyclic graph to label.
- Returns:
- DAG
The labelled DAG with edge attribute
"label"
as either"compelled"
or"reversible"
.
References