Rdocumentation
powered by
Learn R Programming
netdiffuseR (version 1.16.2)
ring_lattice: Ring lattice graph
Description
Creates a ring lattice with $n$ vertices, each one of degree (at most) $k$ as an undirected graph. This is the basis of
rgraph_ws
.
Usage
ring_lattice(n, k)
Arguments
n
Integer scalar. Size of the graph.
k
Integer scalar. Degree of each vertex.
Value
A sparse matrix of class
dgCMatrix
of size $n\times n$.
Details
Since the created graph is undirected, the degree of each node always even. So if
k=3
, then the degree will be
2
.
References
Watts, D. J., & Strogatz, S. H. (1998). Collective dynamics of “small-world” networks. Nature, 393(6684), 440–2.
http://doi.org/10.1038/30918