Skip to main content
. 2020 Dec 7;22(12):1383. doi: 10.3390/e22121383
Algorithm 1 Community Detection Based on Internode Attraction.
Require:
   Graph:G=(V,E);
Ensure:
   C, the graph G’ communities
   // Initialization of the information of each node.
   for each node i in V do
      compute the IF value using Equation (1)
   end for
   for each node i in V do
      compute the GIF value using Equation (2)
   end for
   // Node attraction judgment.
   for each node i in V do
      for each node j in N2(i) do
         compute the Attr(i, j) value using Equation (5)
      end for
      choose the Max_Strong(i) value using Equation (6)
   end for
   // Communities division process.
   Construct attraction two-dimensional table.
   for each pair of nodes in table do
      merge the two communities of each node belongs to
   end for