- class brainpy.connect.SmallWorld(num_neighbor, prob, directed=False, include_self=False)#
Build a Watts–Strogatz small-world graph.
First create a ring over \(num\_node\) nodes 1. Then each node in the ring is joined to its \(num\_neighbor\) nearest neighbors (or \(num\_neighbor - 1\) neighbors if \(num\_neighbor\) is odd). Then shortcuts are created by replacing some edges as follows: for each edge \((u, v)\) in the underlying “\(num\_node\)-ring with \(num\_neighbor\) nearest neighbors” with probability \(prob\) replace it with a new edge \((u, w)\) with uniformly random choice of existing node \(w\).
Duncan J. Watts and Steven H. Strogatz, Collective dynamics of small-world networks, Nature, 393, pp. 440–442, 1998.
- __init__(num_neighbor, prob, directed=False, include_self=False)#
__init__(num_neighbor, prob[, directed, ...])
build connections with certain data type.
make_returns(structures, conn_data[, csr, ...])
Make the desired synaptic structures and return them.