| is_dag {igraph} | R Documentation |
Directed acyclic graphs
Description
This function tests whether the given graph is a DAG, a directed acyclic graph.
Usage
is_dag(graph)
Arguments
graph |
The input graph. It may be undirected, in which case
|
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.
Author(s)
Tamas Nepusz ntamas@gmail.com for the C code, Gabor Csardi csardi.gabor@gmail.com for the R interface.
See Also
Graph cycles
feedback_arc_set(),
girth(),
has_eulerian_path(),
is_acyclic()
Other structural.properties:
bfs(),
component_distribution(),
connect(),
constraint(),
coreness(),
degree(),
dfs(),
distance_table(),
edge_density(),
feedback_arc_set(),
girth(),
is_acyclic(),
is_matching(),
k_shortest_paths(),
knn(),
reciprocity(),
subcomponent(),
subgraph(),
topo_sort(),
transitivity(),
unfold_tree(),
which_multiple(),
which_mutual()
Examples
g <- make_tree(10)
is_dag(g)
g2 <- g + edge(5, 1)
is_dag(g2)