powered by
Grow regular lattice networks, in which every node is connected to m neighbors.
grow_lattice(n = 100L, k = 10L)
Integer. Number of nodes in the network.
Integer. Number of edges added for each incoming node. Can only be even.
n x n adjacency matrix.
Watts, D. J., & Strogatz, S. H. (1998). Collective dynamics of <U+2018>small-world<U+2019> networks. Nature, 393(6684), 440-442.
# NOT RUN { # generate small lattice grow_lattice(n = 6, k = 2) # } # NOT RUN { # generate large lattice grow_lattice(n = 100, k = 10, p = .1) # } # NOT RUN { # }
Run the code above in your browser using DataLab