powered by
This function tests whether the given graph is a DAG, a directed acyclic graph.
is_dag(graph)
A logical vector of length one.
The input graph. It may be undirected, in which case FALSE is reported.
FALSE
Tamas Nepusz ntamas@gmail.com for the C code, Gabor Csardi csardi.gabor@gmail.com for the R interface.
is_dag checks whether there is a directed cycle in the graph. If not, the graph is a DAG.
is_dag
g <- make_tree(10) is_dag(g) g2 <- g + edge(5,1) is_dag(g2)
Run the code above in your browser using DataLab