|
Algorithm 2 CDID |
|
Input:
|
|
Output:
|
| 1: Initialization of information |
| 2: for each node
do
|
| 3: for each node
do
|
| 4: compute the , using Equation (1)–(2) |
| 5: end for
|
| 6: compute the using Equation (3) |
| 7: end for
|
| 8: Information dynamic interaction. |
| 9: while
do
|
| 10:
|
| 11: for each node
do
|
| 12: for each node
do
|
| 13: compute using Equation (4)–(5) |
| 14: compute using Equation (6) |
| 15: end for
|
| 16: compute using Equation (7) |
| 17:
|
| 18: if
then
|
| 19:
|
| 20: end if
|
| 21: end for
|
| 22: the balanced state |
| 23: if
then
|
| 24: Break |
| 25: end if
|
| 26: end while
|
| 27: Find communities
|
| 28: for each node
do
|
| 29: if
then
|
| 30: for each node
do
|
| 31: if
then
|
| 32:
|
| 33: else
|
| 34:
|
| 35: end if
|
| 36: end for
|
| 37: end if
|
| 38: end for
|