| is_acyclic | R Documentation |
This function tests whether the given graph is free of cycles.
is_acyclic(graph)
graph |
The input graph. |
This function looks for directed cycles in directed graphs and undirected cycles in undirected graphs.
A logical vector of length one.
is_forest() and is_dag() for functions specific to undirected
and directed graphs.
Graph cycles
feedback_arc_set(),
girth(),
has_eulerian_path(),
is_dag()
Other structural.properties:
bfs(),
component_distribution(),
connect(),
constraint(),
coreness(),
degree(),
dfs(),
distance_table(),
edge_density(),
feedback_arc_set(),
girth(),
is_dag(),
is_matching(),
k_shortest_paths(),
knn(),
reciprocity(),
subcomponent(),
subgraph(),
topo_sort(),
transitivity(),
unfold_tree(),
which_multiple(),
which_mutual()
g <- make_graph(c(1,2, 1,3, 2,4, 3,4), directed = TRUE)
is_acyclic(g)
is_acyclic(as_undirected(g))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.