is.acyclic {ggm} | R Documentation |
Checks if a given graph is acyclic.
is.acyclic(A)
A |
a square Boolean matrix with dimnames, the edge matrix of a graph. |
a logical value, TRUE
if the graph is acyclic and FALSE
otherwise.
Giovanni M. Marchetti
Aho, A.V., Hopcrtoft, J.E. & Ullman, J.D. (1983). Data structures and algorithms. Reading: Addison-Wesley.
## Force a cyclic graph d <- DAG(y ~ x, x ~ z, z~ y, test=FALSE) ## Test acyclicity is.acyclic(d)