Hi all,
what is the best way to generate a random graph from a given degree
sequence?
``gt.random_graph`` has lots of features, but I can't find a way to provide
a degree sequence.
I appreciate your help,
Matthias
attachment.html (304 Bytes)
Hi all,
what is the best way to generate a random graph from a given degree
sequence?
``gt.random_graph`` has lots of features, but I can't find a way to provide
a degree sequence.
I appreciate your help,
Matthias
attachment.html (304 Bytes)
degs = [7, 4, 3, 4, 8, 5, 9, 7, 4, 1]
g = random_graph(10, lambda i: degs[i], directed=False)
Cheers,
Tiago
Thanks Tiago!
attachment.html (1.02 KB)