Algorithm 1: LPA. |
Input:
|
Output: The result of community detection |
-
1:
Initializaion: assign a unique label to each node in the network,
-
2:
Set t=1
-
3:
Arrange nodes in random order and set it to X.
-
4:
Select each node x in the X sequentially and update its label according to the following function, , where are the neighbors that have been updated before time t, and are the neighbors that have not been updated before time t.
-
5:
If the label in network no longer changes, stop the algorithm, else set and go to step 3.
|