自从 igraph 0.8.0 版本起,erdos.renyi.game()
和 random.graph.game()
都已被弃用,应改用 sample_gnp()
和 sample_gnm()
。 详见这些函数的说明。
random.graph.game()
是此函数的一个(也已弃用的)别名。
用法
erdos.renyi.game(
n,
p.or.m,
type = c("gnp", "gnm"),
directed = FALSE,
loops = FALSE
)
参见
随机图模型(games)bipartite_gnm()
, sample_()
, sample_bipartite()
, sample_chung_lu()
, sample_correlated_gnp()
, sample_correlated_gnp_pair()
, sample_degseq()
, sample_dot_product()
, sample_fitness()
, sample_fitness_pl()
, sample_forestfire()
, sample_gnm()
, sample_gnp()
, sample_grg()
, sample_growing()
, sample_hierarchical_sbm()
, sample_islands()
, sample_k_regular()
, sample_last_cit()
, sample_pa()
, sample_pa_age()
, sample_pref()
, sample_sbm()
, sample_smallworld()
, sample_traits_callaway()
, sample_tree()
作者
Gabor Csardi csardi.gabor@gmail.com
示例
g <- erdos.renyi.game(1000, 1 / 1000)
#> Warning: `erdos.renyi.game()` was deprecated in igraph 0.8.0.
#> ℹ Please use `sample_gnp()` instead.
degree_distribution(g)
#> [1] 0.394 0.348 0.169 0.075 0.013 0.001