get_neighboringDAGs {BCDAG} | R Documentation |
Enumerate all neighbors of a DAG
Description
This functions takes any DAG with 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.
Usage
get_neighboringDAGs(DAG)
Arguments
DAG |
Adjacency matrix of a DAG |
Value
The array containing all neighboring DAGs, with
being the total number of neighbors
Examples
# Randomly generate a DAG
q <- 4; w <- 0.2
set.seed(123)
DAG <- rDAG(q,w)
# Get neighbors
neighbors <- get_neighboringDAGs(DAG)
neighbors
[Package BCDAG version 1.1.1 Index]