|
Input: individual v, layer j. |
1
|
// Determine candidate new neighbors for v.
|
2
|
. |
3
|
if
then
|
4
|
foreach
c in
do
|
5
|
Compute the bias due to degree constraints: |
|
|
6
|
Compute the bias due to the bivariate degree distribution: |
|
. |
7
|
Compute the bias due to bivariate attribute distributions: |
|
. |
8
|
Compute the bias due to triadic closures: |
|
|
|
where layer j triangles formed on adding layer j edge (v, c). |
9
|
Compute propensity of edge (v, c) as the product of 4 biases: |
|
. |
10
|
Normalize propensity to obtain a distribution over : |
|
. |
11
|
w := choose from randomly according to distribution . |
12
|
// Add the layer j edge connecting v to w. |
13
|
|