| Inputs: Set of nodes A, initial neighbor relation matrix (INRM), and Degree of all nodes in set A (DEV) |
| Outputs: Nnode, Set U, Set F and L store the index of first and last neighbor node for nodes in U in NRM, respectively, Set V stores the neighbor relation value of nodes and NRM is the target neighbor relation matrix |
| Temporary variables: V0, Vmin, I, Index |
(1) | I ⟵ A, U ⟵ Ø, Index ⟵ Ø, K = 0, DEVmin = maximum_value |
(2) | for i ⟵ 0 to Nnode − 1 do |
(3) | if DEV [i] = = 0 then |
(4) | U ⟵ U ∪ {I [i]}, I ⟵ СI (I ∩ {I [i]}) |
(5) | else |
(6) | if DEV [i] ≤ DEVmin then |
(7) | DEVmin ⟵ DEV [i], k ⟵ i |
(8) | end if |
(9) | end if |
(10) | end for |
(11) | V0 ⟵ A [k], U ⟵ U ∪ {A [k]}, I ⟵ СI (I ∩ {A [k]}) |
(12) | Repeat until number of elements in U = = Nnode |
(13) | Pick A [j] in set I with smallest dis (i, j), (A [i] ∈ U and A [j] ∈ I) |
(14) | U ⟵ U ∪ {A [j]}, I ⟵ СI (I ∩ {A [j]}) |
(15) | for i ⟵ 0 to Nnode do |
(16) | Index [i] ⟵ (Index of U [i] in A) ∪ Index |
(17) | end for |
(18) | for i ⟵ 0 to Nnode do |
(19) | for j ⟵ to Nnode do |
(20) | NRM [i][j] ⟵ INRM [i] [index [j]] |
(21) | if NRM [i][j] ≤ interference threshold then |
(22) | NRM [i][j] ⟵ 1 |
(23) | else |
(24) | NRM [i][j] ⟵ 0 |
(25) | end if |
(26) | end for |
(27) | F [i] ⟵ pick the index of first neighbor node for U [i] in NRM [Index [i]] |
(28) | L [i] ⟵ pick the index of last neighbor node for U [i] in NRM [Index [i]] |
(29) | V [i] ⟵ str (NRM [index [i]] [F [i] : L [i]]), V [i] ⟵ int (V [i]) |
(30) | end for |
(31) | return (U, F, L, V, and NRM) |