degree.sequence.game

0th

Percentile

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 does.

Keywords
graphs
Usage
degree.sequence.game(out.deg, in.deg = numeric(0), method = "simple", ...)
Arguments
out.deg
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 in.deg.
in.deg
For directed graph, the in-degree sequence.
method
Character, the method for generating the graph. Right now only simple is implemented.
...
Additional arguments, these are used as graph attributes.
Details

The simple method connects the out-stubs of the edges (undirected graphs) or the out-stubs and in-stubs (directed graphs) together. This way loop edges and also multiple edges may be generated.

Value

  • The new graph object.

See Also

erdos.renyi.game, barabasi.game, simplify to get rid of the multiple and/or loops edges.

Aliases
  • degree.sequence.game
Examples
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")
Documentation reproduced from package igraph, version 0.1.2, License: GPL version 2 or later (June, 1991)

Community examples

Looks like there are no examples yet.