TABLE 4.
Pseudocode for unbalanced graphs (algorithm 3)a
Step | Description |
---|---|
1 | G ← original graph |
2 | K ← no. of subgraphs to generate |
3 | F ← no. of edges to subsample |
4 | R ← fraction of subgraphs where edges need to be stable |
5 | for k = 1 to K do |
6 | sample F edges from G to create g |
7 | if components in g are balanced then |
8 | for component in g do |
9 | apply algorithm 2 on component |
10 | end |
11 | scoring matrix initialized from g |
12 | |
13 | apply algorithm 1 on M[k] |
14 | for row, column in M[k] do |
15 | |
16 | end |
17 | apply algorithm 1 on M[k] |
18 | |
19 | apply algorithm 1 on M[k] |
20 | end |
21 | O ← empty matrix |
22 | for row, column in M do |
23 | |
24 | |
25 | for k = 1 to K do |
26 | if then |
27 | |
28 | else if then |
29 | |
30 | if or if then |
31 | for k = 1 to K do |
32 | |
33 | end |
34 | end |
35 |
Pseudocode operators “while,” “for,” “if,” “or,” “else,” “then,” “do,” and “end” are highlighted in bold for clarity.