Algorithm 2.
Procedure MakePopulation
Input: pop. size n, attribute distributions {αi}i=1..m, degree distributions . | |
Output: ({xi}, {dj}, V)i=1..m;j=1..l. | |
1 | V = {v1, v2, . . ., vn}. |
2 | foreach vk in V do |
3 | // Set the attributes of individual vk. |
4 | foreach i in 1...m do |
5 | xi(vk) := an element of Ui randomly selected via αi. |
6 | // Set individual vk's ideal ego net size at each layer. |
7 | foreach j in 1...l do |
8 | , the layer-j ideal degree class of vk. |
9 | τ := χj;s the corresponding layer-j ideal degree distribution, taken from . |
10 | dj(vk) := an integer randomly chosen via pdf τ. |
11 | return ({xi}, {dj}, V)i=1..m;j=1..i. |