is_dag

0th

Percentile

Directed acyclic graphs

This function tests whether the given graph is a DAG, a directed acyclic graph.

Keywords
graphs
Usage
is_dag(graph)
Arguments
graph

The input graph. It may be undirected, in which case FALSE is reported.

Details

is_dag checks whether there is a directed cycle in the graph. If not, the graph is a DAG.

Value

A logical vector of length one.

Aliases
  • is_dag
  • is.dag
Examples
# NOT RUN {
g <- make_tree(10)
is_dag(g)
g2 <- g + edge(5,1)
is_dag(g2)
# }
Documentation reproduced from package igraph, version 1.2.4.1, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.