此函数测试给定的图是否没有环。
详细信息
此函数查找有向图中的有向环和无向图中的无向环。 使用 find_cycle()
返回一个特定的环。
参见
is_forest()
和 is_dag()
用于特定于无向图和有向图的函数。
图环 feedback_arc_set()
, feedback_vertex_set()
, find_cycle()
, girth()
, has_eulerian_path()
, is_dag()
, simple_cycles()
其他 structural.properties: bfs()
, component_distribution()
, connect()
, constraint()
, coreness()
, degree()
, dfs()
, distance_table()
, edge_density()
, feedback_arc_set()
, feedback_vertex_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)
#> [1] TRUE
is_acyclic(as_undirected(g))
#> [1] FALSE