I would like to use the Barabási–Albert (BA) Preferential Attachment model in order to generate graph with specified properties. Numbers of vertices and edges: V(g)=20, E(g)=72, respectively. Vectors of in- and out-degrees are known too. I would like to generate the directed graph without loops, multiple edges and isolated vertices.
Could somebody please give some ideas how to set parameters of the function barabasi.game()? My current settings are:
out_seq<-degree(g, mode="out")
sum(out_seq)
#[1] 72
g1<-barabasi.game(20,out.seq = out_seq)
summary(g1)
#IGRAPH D--- 20 62 -- Barabasi graph
#+ attr: name (g/c), power (g/n), m (g/x), zero.appeal (g/n),
#| algorithm (g/c)
has.multiple(g1)
#[1] FALSE
Previously I used the function degree.sequence.game()
. It's working but I must remove the parameter: method="vl"
degs_out <- degree(g, mode="out")
degs_in <- degree(g, mode="in")
g1<-degree.sequence.game(degs_out, degs_in)#, method="vl")
# IGRAPH D D--- 20 72 -- Degree sequence random graph
#+ attr: name (g/c), method (g/c)
Thanks.
Edit. vl
and v1
are different. In the first case vl
are two letters v
and l
, in the second case v1
includes the letter v
and number 1
.