watts.strogatz.game {igraph}R Documentation

The Watts-Strogatz small-world model

Description

Generate a graph according to the Watts-Strogatz network model.

Usage

watts.strogatz.game(dim, size, nei, p)

Arguments

dim

Integer constant, the dimension of the starting lattice.

size

Integer constant, the size of the lattice along each dimension.

nei

Integer constant, the neighborhood within which the vertices of the lattice will be connected.

p

Real constant between zero and one, the rewiring probability.

Details

First a lattice is created with the given dim, size and nei arguments. Then the edges of the lattice are rewired uniformly randomly with probability p.

Note that this function might create graphs with loops and/or multiple edges. You can use simplify to get rid of these.

Value

A graph object.

Author(s)

Gabor Csardi csardi@rmki.kfki.hu

References

Duncan J Watts and Steven H Strogatz: Collective dynamics of ‘small world’ networks, Nature 393, 440-442, 1998.

See Also

graph.lattice, rewire.edges

Examples

g <- watts.strogatz.game(1, 100, 5, 0.05)
average.path.length(g)
transitivity(g, type="average")

[Package igraph version 0.5.5-4 Index]