ecount()
和 gsize()
是别名。
参见
其他结构查询:[.igraph()
, [[.igraph()
, adjacent_vertices()
, are_adjacent()
, ends()
, get_edge_ids()
, gorder()
, head_of()
, incident()
, incident_edges()
, is_directed()
, neighbors()
, tail_of()
示例
g <- sample_gnp(100, 2 / 100)
gsize(g)
#> [1] 81
ecount(g)
#> [1] 81
# Number of edges in a G(n,p) graph
replicate(100, sample_gnp(10, 1 / 2), simplify = FALSE) %>%
vapply(gsize, 0) %>%
hist()