This function is used to construct the induced DAG, induced polyforest and
reverse topological orderings thereof from a numeric matrix X0. See
Definition 2 in MRCS2023;textualISS.
Usage
get_DAG(X0, sparse = FALSE, twoway = FALSE)
Value
A list with named elements giving the leaves, parents, ancestors and
reverse topological ordering and additionally, if twoway == TRUE, the
roots, children and descendants, of the constructed graph.
Arguments
X0
a numeric matrix.
sparse
logical. Either the induced DAG (FALSE) or the induced
polyforest (TRUE) is constructed.
twoway
logical. If FALSE, only leaves, parents, ancestors
and reverse topological ordering are returned. If TRUE, then roots, children
and descendants are also provided.