Generate random graphs with a given degree sequence
It is often useful to create a graph with given vertex
degrees. This is exactly what
degree.sequence.game(out.deg, in.deg = numeric(0), method = "simple", ...)
- Numeric vector, the sequence of degrees (for undirected
graphs) or out-degrees (for directed graphs). For undirected graphs
its sum should be even. For directed graphs its sum should be the same
as the sum of
- For directed graph, the in-degree sequence.
- Character, the method for generating the graph. Right
- Additional arguments, these are used as graph attributes.
- The new graph object.
g <- degree.sequence.game(rep(2,100)) degree(g) g2 <- degree.sequence.game(1:10, 10:1) degree(g2, mode="out") degree(g2, mode="in")