Skip to main content
. 2011 Jun 1;5:26. doi: 10.3389/fncom.2011.00026

Algorithm 1.

Scheme for generating distance-dependent networks.

for node index i ∈ {1,…,N} do
     Take number of in-neighbors ni ∼ Bin(N − 1, p).
     for in-neighbor index j ∈ {1,…,ni} do
  1. Give weights wk to all nodes k ≠ i that are not yet connected to i s.t. wk=DikW, where Dik is the spatial distance between nodes i and k.

  2. Normalize by P(k)=wkkwk, where P(k) represents the probability to draw node k.

  3. Randomly pick k from the probability mass distribution P and create a connection from k to i.

     end for
     end for