powered by
isAcyclic(amat)
TRUE
FALSE
## A cyclic graph d <- matrix(0,3,3) rownames(d) <- colnames(d) <- c("x", "y", "z") d["x","y"] <- d["y", "z"] <- d["z", "x"] <- 1 ## Test if the graph is acyclic isAcyclic(d)
Run the code above in your browser using DataLab