查找从给定顶点可到达的所有顶点,或相反:通过有向路径,给定顶点可到达的所有顶点。
用法
subcomponent(graph, v, mode = c("all", "out", "in"))
参见
其他结构属性:bfs()
, component_distribution()
, connect()
, constraint()
, coreness()
, degree()
, dfs()
, distance_table()
, edge_density()
, feedback_arc_set()
, feedback_vertex_set()
, girth()
, is_acyclic()
, is_dag()
, is_matching()
, k_shortest_paths()
, knn()
, reciprocity()
, subgraph()
, topo_sort()
, transitivity()
, unfold_tree()
, which_multiple()
, which_mutual()
作者
Gabor Csardi csardi.gabor@gmail.com
示例
g <- sample_gnp(100, 1 / 200)
subcomponent(g, 1, "in")
#> + 1/100 vertex, from 46b80e7:
#> [1] 1
subcomponent(g, 1, "out")
#> + 1/100 vertex, from 46b80e7:
#> [1] 1
subcomponent(g, 1, "all")
#> + 1/100 vertex, from 46b80e7:
#> [1] 1