View source: R/get_neighboringDAGs.R
| get_neighboringDAGs | R Documentation |
This functions takes any DAG with q nodes as input and returns all the neighboring DAGs, i.e. all those DAGs that
can be reached by the addition, removal or reversal of an edge.
get_neighboringDAGs(DAG)
DAG |
Adjacency matrix of a DAG |
The (q,q,K) array containing all neighboring DAGs, with K being the total number of neighbors
# Randomly generate a DAG
q <- 4; w <- 0.2
set.seed(123)
DAG <- rDAG(q,w)
# Get neighbors
neighbors <- get_neighboringDAGs(DAG)
neighbors
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.