barabasi.game(n, m = NULL, out.dist = NULL, out.seq = NULL, out.pref = FALSE,
directed=TRUE)
m
,
out.dist
and out.seq
parameters, only at most one of
these should be not NULL. If all of these are NULL, then constant
out-degree one is used.
If m
is not NULL, it specifies the constant out-degree. Otherwise if out.dist
is not NULL, it is used to generate an
out-degree sequence, the maximum out-degree is
length(out.dist)-1
and the probability of having out-degree
$k$ is out.dist[k+1]/sum(out.dist)
.
Otherwise if out.seq
is not NULL it is used directly as the
out-degrees of the vertices. Its length should be exactly n
.
random.graph.game
g <- barabasi.game(1000)
degree.distribution(g)
Run the code above in your browser using DataCamp Workspace