Set the network has layers
Set each layer has nodes
For To
   
For To
For To
For To
 If
= randint(1, )
While
= rand
 For To
 If
   = rand
  
  Break
 Finish!
Algorithm 1: Constructive procedure of the small-world neural network.