A directed acyclic graph (DAG) is a directed graph with no directed cycles. For directed graphs, only directed cycles are considered.
Arguments
- graph
An
igraph_ptrobject.
Examples
dag = graph_tree(5L)
tree = graph_tree(5L, mode = 2L)
ring = graph_ring(5L)
is_dag(dag)
#> [1] TRUE
is_dag(tree)
#> [1] FALSE
is_dag(ring)
#> [1] FALSE
is_acyclic(dag)
#> [1] TRUE
is_acyclic(tree)
#> [1] TRUE
is_acyclic(ring)
#> [1] FALSE